php新闻捕捉器
// PHP Headlines Grabber by Neil Moomey, www.xuejiqiao.com.
// You are free to use this code as you wish.
// Make sure you get permission from any web sites you grab headlines from.
// You may want to write the headlines to a file on your server to speed things up.
// Grab source code from a file or web site
if(!($myFile=fopen("http://www.xxxxx.com.cn/web/yw3.htm","r")))
{
echo "The news interface is down for maintenance.";
exit;
}
while(!feof($myFile))
{
// Read each line and add to $myLine
$myLine.=fgets($myFile,255);
}
fclose($myFile);
// Extract everything between start and end. You need to include these lines
//in the headlines or pick some unique substring in the html to mark the start
//and end of the news.
$start="<hr align=";
$end="建立镜像";
$start_position=strpos($myLine, $start);
$end_position=strpos($myLine, $end)+strlen($end);
$length=$end_position-$start_position;
$myLine=substr($myLine, $start_position, $length);
// Display HTML
echo $myLine;
?>
标签解析:{list action=category module=share pid=0}
当前地址:https://www.xuejiqiao.com/index.php?s=article&c=html&m=show&catids=&pp=15
当前路由:article/show/index
变量前缀:t
开发模式:已开启
数据缓存:后台未开启缓存
总记录数:10
分页功能:未开启
可用字段:id、tid、pid、mid、pids、name、dirname、pdirname、child、childids、domain、mobile_domain、thumb、show、content、displayorder、pcatpost、topid、catids、is_post、url、total
-
用微信 “扫一扫”
将文章分享到朋友圈。
关注公众号:xue-jiqiao
本文版权归原作者所有,转载请注明原文来源出处,学技巧网站制作感谢您的支持!