function http_status($url) {//判断状态码$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HEADER, 1);curl_setopt($ch, CURLOPT_NOBODY, 1);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_TIMEOUT, 5);curl_exec($ch);$status = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);/*return ($status == 404) ? 1 : 0;*/return $status;}//如果存在的话输出的是200,如果不存在的话输出的是404
