3
1
Back

'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // CTRL+ALT+DEL elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } else { return $base.$rel; } extract(parse_url($base)); $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; function rel2abs($rel, $base) { if ($rel[0]=='#' || $rel[0]=='?') { return array(0.1, 'Yet more stupid-simple comic-fetching.', } function rel2abs($rel.

New Pull Request