Ver original$fileUrl = "http://www.examplecom/test.jpg";$AgetHeaders = @get_headers($fileUrl);if (preg_match("|200|", $AgetHeaders[0])) {// file exists} else {// file doesn't exists}