Home >Backend Development >PHP Tutorial >Example of grabbing news with PHP_PHP Tutorial

Example of grabbing news with PHP_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 17:24:24706browse



News







Medical Insurance Network rolling news

The news is refreshed every minute

$handle = fopen("http://dailynews.sina.com. cn/news1000.shtml","r");
$sign = 0;
while(!feof($handle))
{
$message = fgets($handle,512);
if($sign == 1)
{
print("$message");
}
if(ereg("News Start",$message,$result))
{
$sign = 1;
}
else if(ereg("End of News",$message,$result))
{
$sign = 0;
}
}
fclose($handle);

?>


Tiansong E-Commerce Development Co., Ltd.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532142.htmlTechArticleNews Medical Insurance Network rolling news news is refreshed every minute $handle = fopen("http://dailynews.sina. com.cn/news1000.shtml","r"); $sign = 0; while(!feof($handle)) { $message = fgets($ha...
Statement:
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