开发者

HTTP monitoring for PHP file_get_contents

开发者 https://www.devze.com 2023-01-19 18:55 出处:网络
Is there any tools like httpwatch/fiddler available to monitor the heade开发者_如何转开发rs send by PHP API like file_get_contentsFunctions like file_get_contents only send minimal headers (HTTP metho

Is there any tools like httpwatch/fiddler available to monitor the heade开发者_如何转开发rs send by PHP API like file_get_contents


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消