I know that there are at least 10 the same questions with answers but none of them seems to work for me flawlessly. I\'m trying to check if internal or external image exists (is
This code is actually to check file... But, it does works for images!
$url = "http://www.myfico.com/Images/sample_overlay.gif"; $header_response = get_headers($url, 1); if ( strpos( $header_response[0], "404" ) !== false ) { // FILE DOES NOT EXIST } else { // FILE EXISTS!! }