-2

How can I print request I have sent, header and body? Following:

    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

gives me just $r['request_headers']?

  • No sure what you are asking for, but here is the post which will give you complete idea on how `CURL` works https://stackoverflow.com/questions/2138527/php-curl-http-post-sample-code – Samir Selia Nov 16 '18 at 09:20

1 Answers1

1

i made a server & website specifically for this purpose, http://dumpinput.ratma.net for the website, and https://github.com/divinity76/dumpinput.ratma.net for the server, note that it does not support httpS, so if the input is sensitive, you should probably run your own instance of the server (it's free & open source~), also note that i run the server on a dev-vm from cloudatcost.com, which has a bad reputation for uptime, so don't depend on the website being up.

you could also set up a netcat server as the target of the curl request (but that won't work with Expect 100 Continue POST-requests, but the dumpinput server will still work.)

hanshenrik
  • 19,904
  • 4
  • 43
  • 89