3
1
Back

With some kind of referer check which prevents fetch_file_contents() from retrieving the image. // $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='signoff-wrapper']"); // Pain Train (to get alt tags) elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Girls with Slingshots elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // CTRL+ALT+DEL elseif (strpos($article['link.

New Pull Request