I am getting
4834Invalid Ticket Id error when i am inserting new record in contact module by php My PHP code is -
<?php
$lastname="shirdhonkar";
$xml =
'<?xml version="1.0" encoding="UTF-8"?>
<Contacts>
<row no="1">
<FL val="Email">' .$email. '</FL>
<FL val="Last Name">' .$lastname. '</FL>
</row>
</Contacts>';
$auth="*********************";
$query="authtoken=".$auth."&scope=crmapi&newFormat=1&xmlData=".$xml;
$ch = curl_init();
/* set url to send post request */
curl_setopt($ch, CURLOPT_URL, $url);
/* allow redirects */
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
/* return a response into a variable */
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/* times out after 30s */
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
/* set POST method */
curl_setopt($ch, CURLOPT_POST, 1);
/* add POST fields parameters */
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
//Execute cUrl session
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>