我需要采集以下网址的内容,
<li class="sw-mod-offer-block sw-block-company"> <p> <a class="sw-mod-previewCompanyInfo" target="_blank" rel="nofollow" lc="2" offer-p4p="com" offer-id="offer1" cindex="1" showmedal="1" offer-stat="com" href="http://XX.COM/CCC.HTML" gotodetail="2" memberid="jsyxdz" offerid="526132928">啊啊啊啊</a> </p> </li>
------------------------>以下代码段
<?php $str =file_get_contents("http://nxXX.com"); $preg2="|<[^>]+[^li]><[^>]+[^a]>(.*?){^<p></\a></\p>|iUs"; $c = preg_match_all($preg2, $str,$arr); print_r $arr[0][0]; ?>
-------------
问题描述,在wamp2.2E的集成环境下,phpIDE ,netbeans总是报警;
print_r,偶尔会改变正则规则会出现空数组,但echo,之后就马上出现错误:
function或main()这类东西,
http://route.showapi.com/1071...