<?php
function innerHTML($node){
  $doc = new DOMDocument();
...

PHP innerHTML of a DOMElement

by hubfactor, January 19, 2009 00:56, 3 refactorings, tagged with php, html

The equivalent of the non-s...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php
function parse_accept_headers($default = 'html'){
  $formats = array(
...

PHP Parse HTTP Accept headers

by hubfactor, January 07, 2009 16:25, 4 refactorings, tagged with http

a) define a list of MIME ty...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php
function unique_file($prefix, $suffix){
  $file = sprintf('%s.%s', $prefix, $suffix);
...

PHP Generate a numbered file name

by hubfactor, October 23, 2008 13:53, 2 refactorings, tagged with file

Create a file name from the...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php
function page_xml($page){
  $xml = array(
...

PHP On Moving my xml parsing into ...

by hubfactor, June 25, 2008 11:26
Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php
$id = $_GET['id'] ? $_GET['id'] : 'news'; // default = 'news'
$file = "includes/$id.php";
...

PHP On Content Page Include

by hubfactor, April 11, 2008 21:30 Star_fullStar_fullStar_full
Ed9c50a6db8b5e078b5ef84306a8477c Talk
<script type="text/javascript" id="target">
var urls = [["url1", "name1"], ["url2", "name2"], ["url3", "name3"]];

...

JavaScript On Random URL

by hubfactor, April 11, 2008 21:13

Back to Javascript...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php
if (count($argv) != 3)
	die("Usage: $argv[0] <RSS feed URL> <output dir>\n");	
...

PHP Download all audio enclosur...

by hubfactor, April 11, 2008 20:48, No refactoring, tagged with php, rss, simplexml, curl, xpath

Given an RSS feed and an ou...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php

function imagetrim(&$im){
...

PHP Trim an image vertically

by hubfactor, March 30, 2008 20:25, 1 refactoring, tagged with image, php

Originally from http://zava...

Ed9c50a6db8b5e078b5ef84306a8477c Talk

PHP On Parse del.icio.us RSS feed

by hubfactor, March 05, 2008 17:58

SimpleXML isn't an RDF pars...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
javascript:
(function(){
  var imgs = document.getElementsByTagName("img");
...

JavaScript On Zoom all image files from s...

by hubfactor, March 02, 2008 16:08

I hadn't realised that HTML...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
javascript:
(function(){
  var imgs = document.getElementsByTagName("img");
...

JavaScript On Zoom all image files from s...

by hubfactor, February 28, 2008 19:26
Ed9c50a6db8b5e078b5ef84306a8477c Talk
javascript:
(function(){
  var tex=prompt("TeX input:","");
...

JavaScript On Mathtex bookmarklet

by hubfactor, February 21, 2008 17:58

Ignoring the second version...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php

$url = 'http://www.example.com/url.php?t=4&p=5&sid=ddf175fd02216cbe9fab9a4b528d7185&hilite=2c23tra#link';
...

PHP On Removing Parameters from an...

by hubfactor, February 08, 2008 11:52 Star_fullStar_fullStar_fullStar_fullStar_full
Ed9c50a6db8b5e078b5ef84306a8477c Talk
Date.prototype.when = function(){
  var diff = (new Date() - this) / 1e3;
  var u = [ "second", "minute", "hour", "day", "week", "month", "year" ];
...

JavaScript On Beautify JS Date to how rec...

by hubfactor, February 07, 2008 18:22

Hope the date's not in the ...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
function odump(object, depth, max){
  depth = depth || 0;
  max = max || 2;
...

JavaScript Recursively dump an object

by hubfactor, February 01, 2008 12:40, 3 refactorings, tagged with javascript, recursive, dump

Given an object, iterate th...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
<?php

require_once("arc/ARC2.php"); // http://arc.semsol.org/
...

PHP Parse del.icio.us RSS feed

by hubfactor, January 28, 2008 16:08, 3 refactorings, tagged with php, rdf, del.icio.us

Uses ARC RDF parser from ht...

Ed9c50a6db8b5e078b5ef84306a8477c Talk