I am trying to call a vtiger webservice using PHP CURL like this.
$selectQuery = urlencode("SELECT title,firstname,lastname FROM Contacts;");
$curl = curl_init($data['url'].'/webservice.php?operation=query&sessionName='.$this->sessionName.'&query='.$selectQuery);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json'));
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0");
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
$query = curl_exec($curl);
//$query = json_decode($query);
print_r($query);
but i am getting the error
error:The requested URL returned error: 406 Not Acceptable
I am just doing all the process as mentioned in the below url
Anybody knows the solution for the same ?