note 127016 deleted from function.get-headers by cmb
| From: | cmb@php.net | Date: | Wed, 27 Apr 2022 17:10:46 +0000 |
| Subject: | note 127016 deleted from function.get-headers by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218326@lists.php.net to get a copy of this message | ||
Note Submitter: mauricioamorim dot contato at gmail dot com
----
$url_file = "";//here goes the external file, image or page url
$file_headers = @get_headers($url_file);
$exists = (isset($file_headers[0]) && strpos($file_headers[0], '200'))?true:false;
if($exists){
//file exists
}else{
//file not exists
}