是否有诸如httpwatch / fiddler之类的工具可用于监视PHP API发送的标头(如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
.
这可能会满足您的需求,但是您可以使用Wireshark嗅探任何网络数据包
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.