PHP – Fetches All The Headers Info

The given PHP example fetches all the headers sent by the server in response to a HTTP request.

If the optional format parameter is set to 1, get_headers() parses the response and sets the array's keys. 

Code Example:
$url = '';


print_r(get_headers($url, 1));

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *