POSTing JSON Data With PHP cURL | LornaJane
Same thing without curl as a dependency (for the newbies who don't know about the excellent PHP's streams API): $data = array('name' => 'Hagrid', 'age' => '36'); $data_string = json_encode($data); $result = file_get_contents('http://api.local/rest/users',...