<?php $url="http://top.taobao.com/level3.php?cat=16&show=focus&up=false"; $urltext=strip_tags(file_get_contents($url)); $arr=explode("升降位次",$urltext); $arr=explode("下一页",$arr[1]); $arr=explode("\n",$arr[0]); foreach($arr as $v){$arrnew[]=trim($v);} $newarr=array_values(array_filter($arrnew)); for($i=1;$i