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

Example of grabbing news with PHP_PHP Tutorial

WBOY
Release: 2016-07-13 17:24:24
Original
668 people have browsed it



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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template