note 127016 added to function.get-headers
| From: | mauricioamorim dot contato at gmail dot com | Date: | Wed, 27 Apr 2022 14:43:57 +0000 |
| Subject: | note 127016 added to function.get-headers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218325@lists.php.net to get a copy of this message | ||
$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
}
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.162 (proxied: 45.225.195.218)
----
Manual Page -- https://php.net/manual/en/function.get-headers.php
Edit -- https://main.php.net/note/edit/127016
Del: integrated -- https://main.php.net/note/delete/127016/integrated
Del: useless -- https://main.php.net/note/delete/127016/useless
Del: bad code -- https://main.php.net/note/delete/127016/bad+code
Del: spam -- https://main.php.net/note/delete/127016/spam
Del: non-english -- https://main.php.net/note/delete/127016/non-english
Del: in docs -- https://main.php.net/note/delete/127016/in+docs
Del: other reasons-- https://main.php.net/note/delete/127016
Reject -- https://main.php.net/note/reject/127016
Search -- https://main.php.net/manage/user-notes.php