颠木
新手上路

UID 98123
精华
0
积分 9
帖子 5
金钱 9 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2007-9-6
状态 离线
|
求一个第三方网页获取内容的问题~
正则表达式写不来。。。
<title>title</title>
<ul id="MoreInfo">
<li>一:<strong><span class="rank:token"
rank:params="type=s&uid=f8acb794c00e54d8b9bbe10602bef2aa"><a href="http://www.faf.con/fhsajhfja .htm?a=34254">201</a></span></strong>
</li>
<li>二:<strong><span class="rank:token"
rank:params="type=b&uid=f8acb794c00e54d8b9bbe10602bef2aa"><a href="http://www.faf.con/fhsajhfja .htm?a=34fdaf254">55</a></span></strong> 获取 title
201
55三个内容。
写的获取title如下 还有2个写不来了
$url = 'http://localhost/test/a.txt';
preg_match('|<title>(.*?)<\/title>|i',file_get_contents($url),$m);
echo $m[1];
求助~
谢谢
|
|