";
$rij=array();
while ($rij=mysqli_fetch_array($result)) {
$JobId=($rij["JobId"]);
$DeviceId=($rij["DeviceId"]);
$ChipId=($rij["ChipId"]);
$EventStatus=($rij["EventStatus"]);
$DeviceIp=($rij["DeviceIP"]);
$ExecEv=($rij["ExecuteEvent"]);
$Tries=($rij["Tries"]);
$url = "JobId=".$JobId ;
$url .= "&";
$url .= "DeviceId=".$DeviceId ;
$url .= "&";
$url .= "ChipId=".$ChipId ;
$url .= "&";
$url .= "Status=".$EventStatus ;
$url .= "&";
$url .= "DeviceIp=".$DeviceIp ;
//echo $url;
echo " AAN UIT
";
$curl="http://".$DeviceIp."/?pin=".$ExecEv."&ChipId=".$ChipId."&Meth=A";
//echo $curl;
//$curl ="http://192.168.0.106/?pin=ON2";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$curl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"postvar1=value1&postvar2=value2&postvar3=value3");
// in real life you should use something like:
// curl_setopt($ch, CURLOPT_POSTFIELDS,
// http_build_query(array('postvar1' => 'value1')));
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
echo $server_output;
if($server_output == "