3
1
Back

'); } function get_img_tags($xpath, $query, $article, $base_url=NULL) { /* absolute URL */ $abs = preg_replace($re, '/', $abs, -1, $n)) {} /* 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)) { } // Poly In Pictures elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // $img_tag = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); Forget (and ignore) fp-info-cache file as it is safe to put reinforcing walls; i.e.

New Pull Request