I need to post json object with http post request and to handle responses.
json object :
{
"my_json" : "12345"
}
I wrote somethinh like this,but this don't work.
$url = "http://localhost/my_json.json";
$json_Data = file_get_contents($url,0,null,null);
print_r($json_Data);
And it doesn't print anything.
Help please.
allow_url_fopenenabled in your php.ini file to enable requesting of URLS throughfile_get_contents()etc? See php.net/manual/en/…