Home  >  Q&A  >  body text

http - 通过php的curl方法发出的post/get请求如何抓包调试?

用php发出的http请求无法在Chrome中查看,一般通过什么手段来调试?

phpcn_u1582phpcn_u15822732 days ago930

reply all(3)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 13:02:23

    Record request parameters and response results to the log file. The http request issued by php is not in the same world as chrome

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 13:02:23

    Other things remain unchanged, the request address is changed to http://httpbin.org/post

    reply
    0
  • 高洛峰

    高洛峰2017-05-16 13:02:23

    Set the proxy in curl and proxy to the local machine. Presumably you are using it for debugging during local development, so you might as well set it to http://127.0.0.1:9000. Regarding setting up a proxy, you can read the php documentation.

    Use fiddler or burpsuite pro to set up the listening port above.

    After finishing, you can grab the http request packet. However, when uploading to the official environment, remember to cancel the proxy.

    reply
    0
  • Cancelreply