milliseconds(), 'kind'=> 3, 'diagnosticCard' => '123e4567-e89b-12d3-a456-426655440000', 'subnumber' => '23456787', 'number'=> '34', 'series'=> '2']); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Accept: application/json","appKey: " . $key)); curl_setopt($curl, CURLOPT_TIMEOUT, 20); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonEncoded); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($curl); //$info = curl_getinfo($curl, CURLINFO_HEADER_OUT); //$result = json_decode($result,true); echo $result; curl_close($curl); function milliseconds() { $mt = explode(' ', microtime()); return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000)); } //echo "
";var_dump($result); echo "
"; ?>