Let say client is sending json
data to the local server (in my case it is apache). I need to read the data (in json
format ) which is sent by client to server and access the data on server side for coding further in PHP.
Kindly let me know by using Apache
how to fetch the client data using PHP on the server side.
I have tried the below code
<?php
$clientmessage= $_SERVER['QUERY_STRING']; // "e.g, this is client message"
echo "this is a message sent to client which server recieved", urldecode($clientmessage);
?>
but with that i am able to send the response from server to client (the same message back to client) but when i debug it using Xdebug or print it then the output of client message is wrong it is "XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=143445995265345" instead i should read "e.g, this is client message"
Why i am getting this output ? Kindly let me know by using Apache how to fetch the data (request) from the client on server side ?