Hi
I'm having troubles debugging a POST request I'm making from my web server to another web server.
I'm trying to communicate with a SOAP web service but from some reason a code that worked well from local machine fails when executing on my server
Looking for a way to see the post request my server make to the web service server
web server OS - CentOs
using PHP curl to make the request
Ideas anyone?
views:
81answers:
5
+1
A:
Wireshark? If you've got to connect to the remote end using SSL, then run a stunnel client on the soap client and route requests through that tapping in between.
symcbean
2010-03-03 13:25:39
can you detail?I tried wireshark but I can't see my server traffic just my local
Yaniv
2010-03-03 13:35:32
A:
To see the POST on the server
$h=fopen('out.txt','w'); fwrite($h,var_export($_POST,true));
Maybe the curl is disabled on your server
mazgalici
2010-03-03 13:25:48
thanks, but it is enabled (working with it on some other functionalities) as for the $_POST it only shooes the post to my server not the post my server makes to other servers
Yaniv
2010-03-03 13:38:17
A:
Redirect the post request to a server you control. You can then read the posted data using echo file_get_contents('php://input');
cOle2
2010-03-04 03:03:26
+1
A:
I had the same problem, and using CURLINFO_HEADER_OUT made outgoing request headers show up in debug info.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
$data = curl_exec($ch);
var_dump($data);
$details = curl_getinfo($ch);
var_dump($details);
Kniganapolke
2010-03-05 08:26:16