I am creating a gateway script that must send info to a different provider's server, and I have to debug the code.
It is possible to way, by myself Linux + Apache + PHP server to capture the CURL / XML data out of this script?
I understand with PHP, that I saw for instance the $_Publish, $_GET or $_REQUEST data inside a script, however with CURL I do not really arrive at the http://intranet/capture.php script during my browser - which means this does not work.
Can there be every other way, having a script around the server to capture everything that's passed towards the server, and dump it to some database / flat file?
I even attempted monitoring /var/logs/http/access_login the Linux server, however it did not reveal much
So, how do i see exactly what the CURL script does, exactly, because the server sees it?
what you could try is.
I am unsure if this sounds like that which you mean however it does just like curl (kind of)
You need to begin to see the creation of curl
$ch = curl_init(); // initialize curl handle curl_setopt($ch, CURLOPT_URL, $url ); // set url to post to curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4s curl_setopt($ch, CURLOPT_POST, 1); // set POST method $result = curl_exec($ch); // run the whole process curl_close($ch); echo htmlentities($result);
I really hope this is exactly what you mean
Within this situation, you're the client and also the provider's server may be the server.
Presuming you're running the curl command in the client, all you are able reach is exactly what Robert Cabri stated.
If you're trying to check out what is being received through the server, you must have appropriate access and should also understand what application stack the server is running for everyone your request.