qiuaaa
注册会员

UID 72334
精华
0
积分 70
帖子 58
金钱 70 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-4-25
状态 离线
|
[广告]: q
m
我做网页采集,过虑数据不成功.希望高手帮改改
<?
$fp = fopen("http://www.div8.cn/Article/3/12/index.htm","r");
if(!$fp){
echo "打开远程文件失败!";
exit;
}
while(!feof($fp)){
$buton.=fgets($fp,4096);
}
$gz="/<li class=\"ListText([1|2])\"><p class=\"ListLeft\"><a href=\"(.)\" target=\"_blank\">·(.)<\/a><\/p><p class=\"ListRight\">[(.)]<\/p><\/li>/";
preg_match_all($gz,$buton,$Content);
echo count($Conter[0]);
for($i=0;$i < count($Conter[0]);$i++){
echo "连接-".$Conter[0][$i]."-----".$Conter[1][$i]."<br/>";
}
?> 鄙人新手.对PHP .不是太熟悉. 希望高手给我看看着程序为什么读不出来.
|  Start AD
Stop AD
|
|