4,250
社区成员
发帖
与我相关
我的任务
分享
$url="http://www.360buy.com/allSort.aspx";
$content=preg_replace("/>\s+</","><",str_replace(array("\r","\n"),'',file_get_contents($url)));
preg_match_all("/<em><a\shref=[\"'][\/]?[^\/]+\/([-\d]+?)\.html[\"']>([^<>]+?)<\/a><\/em>/",$content,$match);
print_r($match);

$url="http://www.360buy.com/allSort.aspx";
$content=preg_replace("/>\s+</","><",str_replace(array("\r","\n"),'',file_get_contents($url)));
preg_match_all("/<em><a\shref=\"\/?products\/([-\d]+?)\.html\">([^<>]+?)<\/a><\/em>/",$content,$match);
print_r($match);
~~