File: /home/imensosw/www/imenso.co/dev/kit/index.php
<div id="mahesh"><noscript>The Kit Builder requires JavaScript to be enabled</noscript></div>
<script src="https://api.kitbuilder.co.uk/api/bootstrapper?distributorId=668216"> </script>
<script> KitBuilder.init("#mahesh"); </script>
<?php
die();
/*
Client ID: 1000.L0GDGKMG7P6V8DBYSWF60RYH5MMGQV
Client Secret: 1a17829705988f4d07740706c64bc2b703e09ae8b6
*/
/*
Client ID successfully registered
Client ID: 1000.NBHTRIWROS5DWFVWO9MS507U6H99SV
Client Secret: 777ddfcfbcddb830f892f244fad6a13b36bd06668b*/
?>
<?php
$ch = curl_init('https://crm.zoho.in/crm/private/xml/Leads/insertRecords?');
curl_setopt($ch, CURLOPT_VERBOSE, 1);//standard i/o streams
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);// Turn off the server and peer verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//Set to return data to string ($response)
curl_setopt($ch, CURLOPT_POST, 1);//Regular post
//Set post fields
//this script is being proccessed by a form so I also put all of my $_POST['name'] variable here to be
//used in the $xmlData variable below
$authtoken = "6ab7086036264e69a40943a0526653b9";
$xmlData = '<Leads>
<row no="1">
<FL val="SMOWNERID">2001</FL>
<FL val="Company">hg fghfg fg</FL>
<FL val="First Name">Rahul</FL>
<FL val="Last Name">Joshi</FL>
<FL val="Designation">Developer</FL>
<FL val="email">rauljoshi.gogu@gmail.com</FL>
<FL val="Phone">8839634253</FL>
<FL val="Lead Source">External Referral</FL>
<FL val="Lead Status">Contacted</FL>
<FL val="Description">Sample Description.</FL>
</row>
</Leads>';
$xmlData2 = urlencode($xmlData);
$query = "newFormat=1&duplicateCheck=2&authtoken={$authtoken}&scope=crmapi&xmlData={$xmlData2}";
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
//echo $query;
//Execute cUrl session
$response = curl_exec($ch);
//print_r($response);
curl_close($ch);
?>