获取错误 - 4600无法处理您的请求。请确认您是否输入了正确的方法名称,参数和参数值。
$auth="authkey"; $email = $_POST['lowner']; $firstName = $_POST['fname']; $lastName = $_POST['lname']; $email = $_POST['email']; $phone = $_POST['phone']; $url = 'https://crm.zoho.com/crm/private/xml/Leads/insertRecords?'; $post = 'newFormat=1&authtoken='.$auth.'&scope=crmapi&xmlData=<Leads> <row no="1"> <FL val="Lead Owner">'.$email.'</FL> <FL val="First Name">'.$firstName.'</FL> <FL val="Last Name">'.$lastName.'</FL> <FL val="Email">'.$email.'</FL> <FL val="Phone">'.$phone.'</FL> <FL val="Description">Insert ZOHO Lead</FL> </row> </Leads>'; //================= start curl =================== $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_POSTFIELDS,$post); $result = curl_exec($ch); curl_close($ch); //================= end curl =================== echo '<pre>'; print_r($result); exit;
答案 0 :(得分:0)
应该可以正常工作,但是您正在用其他电子邮件覆盖包含潜在客户所有者变量的电子邮件。
检查以下代码:
$auth="authkey";
$leadowner = $_POST['lowner'];
$firstName = $_POST['fname'];
$lastName = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$url = 'https://crm.zoho.com/crm/private/xml/Leads/insertRecords?';
$post = 'newFormat=1&authtoken='.$auth.'&scope=crmapi&xmlData=<Leads>
<row no="1">
<FL val="Lead Owner">'.$leadowner.'</FL>
<FL val="First Name">'.$firstName.'</FL>
<FL val="Last Name">'.$lastName.'</FL>
<FL val="Email">'.$email.'</FL>
<FL val="Phone">'.$phone.'</FL>
<FL val="Description">Insert ZOHO Lead</FL>
</row>
</Leads>';
//================= start curl ===================
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$result = curl_exec($ch);
curl_close($ch);
//================= end curl ===================
echo '<pre>';
print_r($result);
exit;