$url = "http://wx.58haha.cn/1.html";
$array = get_headers($url,1);
if(preg_match('/200/',$array[0])){
echo "<pre/>";
print_r($array);
}else{
echo "无效url资源!";
}
$array = get_headers($url,1);
if(preg_match('/200/',$array[0])){
echo "<pre/>";
print_r($array);
}else{
echo "无效url资源!";
}