PHP JSON HTTP POST -


i have server accepts http post request json body , sends response in json. dont know way in php this.

i need send request server json body

{ myname="hitesh" myphone="8008288081" } 

any highly appreciated.

the api available in server hosted @ xyz.hitesh.com , php code hosted @ abc.test.com

$requestbody = file_get_contents('php://input'); $requestbody = json_decode($requestbody);  // ???  $response = array('accepted' => 'yes'); header('content-type: application/json'); echo json_encode($response); 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -