$url = 'localhost/newapi/client/';
$opts = array('http' =>
array(
'method' => 'POST',
'header' => "Content-Type: application/json\r\n"."Authorization: ".<authkey>."\r\n",
'content' => $data,
'timeout' => 60
)
);
$context = stream_context_create($opts);
$result = file_get_contents($url, false, $context, -1, 40000);
return $result;
No comments:
Post a Comment