<a href="/novel.m?id=2135619&p=1&count=2&esid=YwQa9y1XVWC&wver=c&fr=62.1.1.0">仙人俗世生活录</a>(<a href="/s.m?f=2&q=%E6%96%AD%E6%A1%A5%E6%AE%8B%E9%9B%AA&r=16&esid=YwQa9y1XVWC&wver=c&fr=62.1.1.1">断桥残雪</a>)
解决方案 »
- Apache安装测试问题
- apache与php连接问题
- 有关sql语句长度限制的问题!请高手相助
- 调用mysql接口函数时的问题?
- 不能发邮件,是smtp没有配好还是php.ini没有配好?还是其他原因?在线
- 今天决定考研了,散分,为我来年成功庆祝!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 请教:如何将图片存储到数据库中?
- cookie写不到客户端,要如何搞!
- mssql函数操作mssql 2k为什么只能将Text类型写入4382个节字呢?
- 我是初学者,请帮我看看这段代码错在哪?数据库查询问题
- 正则怎么取空格前面的字符窜?
- 使用mysql_fetch_array 获取mysql date_format返回的值
preg_match_all('/.*?(<a href="clist.*?>查看目录<\/a>)/',$str,$data);
print_r($data);
查看目录 可以对应你要采集的网站 是UTF-8 GB2312 换成 中文匹配正则.. 记得加 /u
print_r(htmlspecialchars($matches[0]));
/*
输出结果:
<a href="clist.m?id=2275575&p=1&tpg=49& esid=YwQa9y1XVWC&wver=c&fr=62.2.0.3">查看目录</a>
*/
$str = '<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>仙人俗世生活录_宜搜小说搜索(book.easou.com)< /title><link type="text/css" href="./2.0/css/style.css" rel="stylesheet" /><style type="text/css">body{font-size:16px;line-height:24px;}.content{margin: 2px; border: 1px solid #c1d7f0; padding:2px 0px 0px 0px;font-size:16px;line-height:24px;background-color:#f5f8fb;color:#000000;}.content .title{ line-height:1.5em;text-align:left; font-weight: bold; margin:0px;background-color:#e1effd; border-bottom: 1px solid #d9e3f4;}</style></head><body><div class="gg" id="top" ><a href="http://www.139gz.com/go?zid=209&aid=35034&esid=YwQa9y1XVWC&cid=0&kw="><img src="http://www.adet.mobi/ftad/imageadreq?pid=199" alt=""/><img src="http://wap.moad.cn/ftad/pixel/pixel?pid=199" alt=""/></a></div><div class="news_title"><a href="/index.m?esid=YwQa9y1XVWC&wver=c">小说</a>>仙人俗世生活录</div><div class="news1"><img src="http://111.1.33.158/i/cilook/16/cilook_cn_16724/16724_1.jpg" alt="easou" /><br /><a href="/show.m?id=2275575&st=1&esid=YwQa9y1XVWC&wver=c&cu=http%3A%2F%2Fwww.cilook.cn%2Fhtml%2F16724%2F2444488.html" >开始阅读</a> <a href="clist.m?id=2275575&p=1&tpg=49& esid=YwQa9y1XVWC&wver=c&fr=62.2.0.3">查看目录</a>& lt;br />作者:<a href="/s.m?f=2&q=%E6%96%AD%E6%A1%A5%E6%AE%8B%E9%9B%AA& r=16&esid=YwQa9y1XVWC&wver=c&fr=62.2.0.1">断桥残雪</a><br/>下载:<a href="http://121.11.88.150:8090/dlj.do?id=2275575&gid=2135619& amp;amp;a=断桥残雪&nn=仙人俗世生活录&wver=c& esid=YwQa9y1XVWC">JAR</a>/<a href="http://121.11.88.150:8090/dlt.do?id=2275575&gid=2135619& amp;amp;a=断桥残雪&esid=YwQa9y1XVWC&wver=c">TXT</a& gt;<br />状态:<a href="serid.m?esid=YwQa9y1XVWC&wver=c">连载</a><br />更新:<a href="/sl.m?gid=2135619&esid=YwQa9y1XVWC&wver=c& fr=62.2.1.2">第四百八十八章李哥</a> 07-05 19:19<img src="/ft/new.gif" alt="easou" /><br />来源:<a href="nr.m?gid=2135619&esid=YwQa9y1XVWC&wver=c&fr=62.2.0.4" ><span style="color:#4ca520;" >cilook.cn等39个网站</span></a><br />类别:<a href="/s.m?f=3&q=wuxia&esid=YwQa9y1XVWC&wver=c& amp;amp;fr=62.2.1.0">武侠</a><br />简介:<br /> 沦落世俗,才发现这个世界的悲欢喜乐是那么的让人心动留恋,才发 ...<a href="/sy.m?gid=2135619&esid=YwQa9y1XVWC&wver=c">更多»& lt;/a><br /><br/></div><div class="content"><div class="title" > 【书友热评】<a href="/brl.m?nid=2275575&gid=2135619&esid=YwQa9y1XVWC& amp;amp;p=1&wver=c&sf=2">共39条</a></div>& lt;div style="margin:5px;" ><div style="border-bottom: 1px dotted #ccc; background-color: #f5f8fb;" ><span style="color:#828282;" >夜狼归</span>:等的花都谢了<span style="color:#828282;" >[07-06 10:01]</span><br /></div><div style="border-bottom: 1px dotted #ccc; background-color: #f5f8fb;" ><span style="color:#828282;" >夜狼归</span>:更新的真慢<span style="color:#828282;" >[07-06 09:59]</span><br /></div><div style="border-bottom: 1px dotted #ccc; background-color: #f5f8fb;" ><span style="color:#828282;" >超超哥</span>:草,我另一本一千多章的小说都看完了,你这才更二十章!你牛比!哥不看了!靠!<span style="color:#828282;" >[07-05 22:59]</span><br /></div><a href="/brl.m?nid=2275575&gid=2135619&esid=YwQa9y1XVWC&p=1&wver=c&sf=2"><img src="./2.0/img/cloud.gif" alt="" /> 更多书评»</a><br /><a href="/lgi.m?id=2275575&esid=YwQa9y1XVWC&gid=2135619&wver=c&rp=2&sf=2" >登录发表评论</a><br /></div></div><div class="news1" ><a href="/show.m?id=2275575&st=1&esid=YwQa9y1XVWC&wver=c&cu=http%3A%2F%2Fwww.cilook.cn%2Fhtml%2F16724%2F2444488.html" >开始阅读</a> <a href="clist.m?id=2275575&p=1&tpg=49& esid=YwQa9y1XVWC&wver=c&fr=62.2.3.1">查看目录</a>& lt;br /></div><div class="top" ><a href="#top" >↑回顶部</a></div><div class="gg"><a href="http://www.139gz.com/go?zid=638&aid=27605& esid=YwQa9y1XVWC&cid=0&kw=">*视频</a>.<a href="http://www.139gz.com/go?zid=638&aid=28155& esid=YwQa9y1XVWC&cid=0&kw=">私密</a>.<a href="http://www.139gz.com/go?zid=638&aid=26588& esid=YwQa9y1XVWC&cid=0&kw=">人肉</a>.<a href="http://www.139gz.com/go?zid=638&aid=26084& esid=YwQa9y1XVWC&cid=0&kw=">猎艳</a></div>& lt;div class="news1" ><a href="http://wap.easou.com?wver=c">宜搜</a>><a href="/index.m?esid=YwQa9y1XVWC&wver=c">小说</a>>& lt;a href="/s.m?q=仙人俗世生活录&idx=0&sty=1&sm=0&esid=YwQa9y1XVWC& amp;amp;wver=c">结果页</a><br /><form action="/s.m" method="get"><input type="hidden" name="idx" value="0" /><input type="hidden" name="sty" value="1" /><input type="hidden" name="sm" value="0" /><input type="hidden" name="fr" value="62.0.0.0" /><input type="hidden" name="esid" value="YwQa9y1XVWC" /><input type="hidden" name="wver" value="c" /><input type="hidden" name="w" value="1" /><input type="hidden" name="cl" value="zj" /><input type="hidden" name="sn" value="0" /><input type="hidden" name="n" value="3" /><input type="hidden" name="fa" value="0" /><input name="q" type="text" size="18" maxlength="64" class="word" /><br/><input type="submit" name="button1" value="搜小说" class="button" /><input type="submit" name="author" value="搜作者" class="button" /> <a href="http://wap.easou.com/?esid=3UOsLw3fGavSKz3TjFjPfB2&wver=c" >更多搜索>></a></form></div><div class="yd"><a href="http://wap.easou.com?wver=c">宜搜首页</a> |& nbsp;<a href="http://wz.easou.com/?esid=YwQa9y1XVWC&wver=c">网址大全< /a><br/><a href="bm_l.m?esid=YwQa9y1XVWC&wver=c">我的书柜</a>& nbsp;| <a href="ysfk.m?esid=YwQa9y1XVWC&wver=c">意';
preg_match_all('/<a[^>]+>查看目录<\/a>/i', $str, $match);print_r($match);
$str='你的字符串';
preg_match('/<a[^>]+fr=62\.2\.0\.3">查看目录<\/a>/is', $str, $match);
print_r($match);