具体如下:
function url_exists($url) { $hdrs = @get_headers($url); return is_array($hdrs) ? preg_match('/^HTTP\\/\\d+\\.\\d+\\s+2\\d\\d\\s+.*$/',$hdrs[0]) : false; }
上一篇:使用php怎么获取twitter的最新消息
下一篇:如何在PHP中将对象转换为关联数组