There are many programs to intercept the homepage news, but they are not successful. There are two working principles. One is to use the back-end database interface called backend by some websites, and the other is to intercept the html code directly. This program uses the latter. It should be said that the fault tolerance performance is relatively good.
$search = eregi("(.*)", $read, $printing);//Intercept a piece of source code, it is best to analyze the source code first //Start extracting the remaining source code below $printing[1] = str_replace("href="/homer/?", "href="", $printing[1]); $printing[1] = str_replace("href="/headlines/fullcoverage/", "href= "http://www.yahoo.com.cn/headlines/fullcoverage/", $printing[1]); $printing[1] = str_replace("< tr>
print "News".($i+1) .") : $content[$i] ";//The exciting moment has arrived! It shows!
}
?>
Debug passed under php3/php4 apache.
http://www.bkjia.com/PHPjc/316289.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316289.htmlTechArticleInterception of yahoo.com.cn news [experimental only] There are many programs to intercept homepage news, but they are not successful. . There are two working principles. One is to use what some websites call backen...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn