<?php

$url = "https://192.168.16.200/jsonPTS";

$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($curl, CURLOPT_USERPWD, "jpanta:gigi240602");/*Infosol24*/
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

$headers = array(
   "Accept: application/json",
//   "Authorization: Basic YWRtaW46YWRtaW4=",
   "Content-Type: application/json",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

$data = <<<DATA
{
 "Protocol":"jsonPTS",
"Packets":[{
 "Id":1,
 "Type":"Restart"
}]
}
DATA;


curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$resp=curl_exec($curl);
echo $resp;
curl_close($curl);
//for debug only!
?>
