3
1
Back

"//img[@class='comic']", $article); //also get blog elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $img_tag . $article['content']; elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article){ /* dirty absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} $re = array( '#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#' ); for ($n = 1; $n > 0; $abs = preg_replace($re, .

New Pull Request