3
1
Back

$this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Camp Weedonwantcha elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Joy of Tech elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // only keep everything starting at the first elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' .

New Pull Request