PagServer.php
codice:
$query_post= "TEST-QUERY-CURL";
$messageArray=array( 'message'=>$query_post);       
$message=http_build_query($messageArray);


$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch,CURLOPT_POST, 0); //0 for a get request
curl_setopt($ch,CURLOPT_POSTFIELDS,$message);


// ELIMINA ERRORE (Syntax error, malformed JSON) su server Win
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);


curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,30);
$json = curl_exec($ch);
curl_close ($ch); 
$jsonDecode = json_decode($json);