http://php.net/manual/en/reserved.variables.httpresponseheader.php
$context = stream_context_create(['http' => ['ignore_errors' => true]]);
$result = file_get_contents("http://example.com", false, $context);
var_dump($http_response_header);
Related Contents:
- Download File to server from URL
- How do I send a POST request with PHP?
- Can PHP cURL retrieve response headers AND body in a single request?
- Deleting all files from a folder using PHP?
- How to post data in PHP using file_get_contents?
- How to send a GET request from PHP?
- What is the size limit of a post request?
- Setting Curl’s Timeout in PHP
- How to make asynchronous HTTP requests in PHP
- Doing HTTP requests FROM Laravel to an external API
- PHP script to loop through all of the files in a directory?
- What is the canonical way to determine commandline vs. http execution of a PHP script?
- How to write into a file in PHP?
- RESTful API methods; HEAD & OPTIONS
- PHP filesize MB/KB conversion [duplicate]
- Count how many files in directory PHP
- continue processing php after sending http response
- Correct way to set Bearer token with cURL
- PHP: How to check if image file exists?
- Efficiently counting the number of lines of a text file. (200mb+)
- How do I load a PHP file into a variable?
- Getting the names of all files in a directory with PHP
- How do I add PHP code/file to HTML(.html) files?
- How can one check to see if a remote file exists using PHP?
- PHP: how can I get file creation date?
- How to join filesystem path strings in PHP?
- How to pass $_GET variables to a PHP script via the command line?
- Load Blade assets with https in Laravel
- Who Add “_” Single Underscore Query Parameter?
- HTTP protocol’s PUT and DELETE and their usage in PHP
- How can I overwrite file contents with new content in PHP?
- how to save DOMPDF generated content to file? [closed]
- How to use HTTP cache headers with PHP
- PHP: Read Specific Line From File
- How to make HTTP requests in PHP and not wait on the response
- Forcing to download a file using PHP
- The correct way to delete all files older than 2 days in PHP
- The date/time format used in HTTP headers
- Quickest Way to Read First Line from File
- Setup HTTP expires headers using PHP and Apache
- PHP list of specific files in a directory
- NginX issues HTTP 499 error after 60 seconds despite config. (PHP and AWS)
- Get “Content-Type” header of request in PHP
- Finding Extension of uploaded file (PHP) [duplicate]
- Move_uploaded_file() function is not working
- Can’t find the file created by outfile in MySQL
- Utility of HTTP header “Content-Type: application/force-download” for mobile?
- Replace string in text file using PHP
- Send HTTP request from PHP without waiting for response?
- What is an appropriate content-type header for JavaScript files?