3
1
Back

With some kind of referer check which prevents fetch_file_contents() from retrieving the image. // $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Drugs and Wires elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)) { // Dilbert elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // there's both alt and title texts, they're both different, use both. } elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image.

New Pull Request