3
1
Back

= "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme.'://'.$abs; } /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; } /* dirty absolute URL */ $abs = preg_replace($re, '/', $abs, -1, $n)) { } function get_img_tags($xpath, $query, $article){ $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= "Alt: " . $img->getAttribute('title') . ""; } // SatW elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { elseif.

New Pull Request