Zoho and cURL in PHP, unable to communicate with server

Zoho and cURL in PHP, unable to communicate with server

Hello,

I am currently trying to use Zoho API to send some leads via "insertRecord" but my code won't work. I have tried all solutions I could find on internet, I have used 5 differents type of cUrl call (even the one in Zoho API) but nothing happened when I try to launch my request. Here is my XML
  1. $xml = "<?xml version='1.0' encoding='UTF-8'?>";
  2.         $xml .='
  3.             <Leads>
  4.             <row no="1">
  5.             <FL val="SMOWNERID">'.$ID.'</FL>
  6.             <FL val="Company">Your Company</FL>
  7.             <FL val="First Name">Hannah</FL>
  8.             <FL val="Last Name">Smith</FL>
  9.             <FL val="Email">testing@testing.com</FL>
  10.             <FL val="Title">Manager</FL>
  11.             <FL val="Phone">1234567890</FL>
  12.             <FL val="Home Phone">0987654321</FL>
  13.             <FL val="Other Phone">1212211212</FL>
  14.             <FL val="Fax">02927272626</FL>
  15.             <FL val="Mobile">292827622</FL>
  16.             </row>
  17.             </Leads>';
And here my cURL function that I found on this forum here https://help.zoho.com/portal/en/community/topic/posting-with-php-curl
  1. public static function sendXMLViaCurltoZoho ($url,$query=NULL,$xml=NULL) {
  2.       $auth = 'MY AUTH';
  3.       $ch = curl_init($url);
  4.       curl_setopt($ch, CURLOPT_VERBOSE, 1);
  5.       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  6.       curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  7.       //This CIPHER_LIST , this throw me an error "failed to setting cipher list" But without this line nothing           // happen error or not juste nothing
  8.       curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'rsa_rc4_128_sha');
  9.       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//Set to return data to string ($response)
  10.       curl_setopt($ch, CURLOPT_POST, 1);//Regular post
  11.       //Set post fields
  12.       $query_string = "authtoken={$auth}&scope=crmapi";
  13.       if (isset($query)) {
  14.             $query_string .= $query;
  15.       }
  16.       if (isset($xml)) {
  17.             $query_string .= "&xmlData={$xml}";
  18.       }
  19.       echo("SendXMLViaCurltoZoho - URL: \n----------\n".$url."-------------------?".$query_string."\n--------\n");
  20.       print_r(curl_getinfo($ch));
  21.       
  22.       curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);// Set the request as a POST FIELD for curl.
  23.       
  24.       if( ! $result = curl_exec($ch)) 
  25.        { 
  26.            trigger_error(curl_error($ch)); 
  27.        } 
  28.       
  29.       print_r(curl_getinfo($ch));
  30.       
  31.       curl_close($ch);
  32.       return $response;
  33.     }
Thanks for your help :D