NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Logging request/response


Joined: 19 Sep 2010
Posts: 1
Reply with quote
Hello,

Is there any possibility to store the request and response on web-service server for logging purposes?
For request I can store the $HTTP_RAW_POST_DATA but how can I store the response before sending it to the client?
View user's profileFind all posts by StefanVSend private message


Joined: 26 Jul 2007
Posts: 14
Reply with quote
One method is of course before you return the value to the client within your server to store is to a local file/database. But that is all dependent on how you code it.

i.e.

supposed you have finished gathering your data to be returned and then
$return_data = $xml_writer->outputMemory(true);

$fh = fopen('outputdata.txt,'w');
fwrite($fh,$return_data);
flocse($fh);

// and this returns the data back to the client that called your server
return $return_data;
View user's profileFind all posts by addisonpSend private message
Logging request/response
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic