3
1
Back

Written for about a dozen webcomics. Examples: * Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = new DOMXPath($doc); } function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme . '://' . $abs; if (preg_match("@.*(

New Pull Request