How to analyze HTTP headers generated&received
Analyzing HTTP headers is a great way to debug websites. This is the easiest way to check what data was actually returned by Ajax request or find out if a website redirected us to another place. You can also check POST and GET fields sent by the browser and even modify then on the fly.
How to get HTTP headers of any remote file?
Want to check Content-Type or Content-Length of a remote file without downloading whole file?
Then you should just request headers and not whole file from a remote server using HTTP protocol.
Here’s how to do this in PHP using fsockopen or cURL.