Let's also talk about the homepage news-example. The interception of yahoo.com.cn News [experiment only] has many programs for intercepting homepage news, but it cannot be successful. They work in two ways: one is to use some websites that call backen to intercept yahoo.com.cn news [for experiment only]
There are many programs for intercepting homepage news, but they cannot be successful.
They work in two ways: one is to use the backend database interface called backend for some websites, and the other is to intercept the html code with a hard voice. This program uses the latter. It should be said that the fault tolerance is better.
$ Open = fopen ("http://www.yahoo.com.cn/index.html", "r"); // web address
$ Read = fread ($ open, 15000 );
Fclose ($ open );
$ Search = eregi (" (.*) ", $ Read, $ printing); // extract a piece of source code. you 'd better analyze the source code first.
// Start to retrieve the source code
$ 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 (""," ", $ Printing [1]);
$ Printing [1] = str_replace (""," ", $ Printing [1]);
$ Printing [1] = str_replace ("class = sbody", "", $ printing [1]);
$ Printing [1] = str_replace (""," ", $ Printing [1]);
$ Content = $ printing [1];
$ Content = explode ("-", $ content );
$ Headlines = sizeof ($ content );
For ($ I = 0; $ I <$ headlines; $ I ++ ){
Print "news". ($ I + 1). "): $ content [$ I]
"; // Exciting time! Shown!
}
?>
Debugging is successful under php3/php4 apache.
Ghost has many programs for intercepting homepage news, but it cannot be successful. They work in two ways. one is to use some websites called backen...