PHP Remote File Exists

function remote_file_exists($filename){
	$file_headers = @get_headers($filename);
	if($file_headers[0] == 'HTTP/1.0 404 Not Found'){
	      return false;
	} else {
	    return true;
	}
}