views:

51

answers:

3

Is there any tools like httpwatch/fiddler available to monitor the headers send by PHP API like file_get_contents

+2  A: 

You can get them yourself: just query by file_get_contents() your own script with (supposing you're using apache):

print_r(apache_request_headers());

And there you'll get all the headers being sent by file_get_contents.

zerkms
+2  A: 

Functions like file_get_contents only send minimal headers (HTTP method and host) as it's up to the developer to add any additional headers. You can see this for yourself by making a request to a script on your own server.

webbiedave
+2  A: 

This might be a bit too much for your needs, but you can sniff any network packets with Wireshark

Gordon