3
1
Back

Or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } /* absolute URL */ $abs = preg_replace($re, '/', $abs, -1, $n)) { } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Jesus & Mo elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Chainsawsuit // Chainsawsuit elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] .= "
Alt: " . $article['id']; } return $result_html; } function rel2abs($rel, $base) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $rel; } if ($rel[0]=='#' || $rel[0]=='?') { $path = ''; } /* OotS uses some kind of referer check which prevents fetch_file_contents() from retrieving the image. * Possible fix would be nice. Lots of options become available. Everything by Hagiwo (quantizer.

New Pull Request