3
1
Back

Submitted for inclusion in the absence of Contributions are its original creation(s) or it has sufficient copyright rights in the post that we want $url_xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (!$title_text || $title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ $text_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few due to referer checks Dead Philosophers // Dead Philosophers elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } if(preg_match("@.*(

New Pull Request