$url ='http://www.phprm.com';
$body=@file_get_contents($url);
preg_match_all('/href=['"]?([^'"]*)['"]?>(.*)/i',$body,$b);
$nums = array();
foreach($b[1] as $u){
if(in_array($u,$nums)){
continue;
}
$nums[]=$u;
$title=strip_tags($u);
echo $title."";
}
本文地址:
转载随意,但请附上文章地址:-)