How do I check if a URL exists (not 404) in PHP?
function url_exists($url) { $headers = @get_headers($url); return (strpos($headers[0],'200')===false)? false:true; }