3
1
Back

DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "
Alt: $alt_text
"; } } } // Breaking Cat News elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { } /* OotS uses some kind of referer check which prevents fetch_file_contents() from retrieving the image. // $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } //Sites that provide images and just need alt tags textified. If(ADD_IDS){ $article = $this->alt_textify($article); if.

New Pull Request