Пример
$file = 'http://umbrellax.ru/favicon.ico';
if (url_file_exists($file)) {
echo '<img src="' . $file . '" width="16" height="16" alt="i" />';
}

                        
function url_file_exists($furl) {
$headers = get_headers($furl);
if (preg_match('|200|', $headers[0])) {
return true;
} else {
return false;
}
}
0 12 0
Без комментариев...