从webhook for PHP映射值
如何从webhook映射/输入/输入值 我正在创建一个文本应用程序,它将在CRM中设置会议后发送文本。正如您在下面的代码中所看到的,我们将使用CRM发送的名称、日期、时间等 我的术语可能太离谱了,希望您能提供指导从webhook for PHP映射值,php,sms,webhooks,Php,Sms,Webhooks,如何从webhook映射/输入/输入值 我正在创建一个文本应用程序,它将在CRM中设置会议后发送文本。正如您在下面的代码中所看到的,我们将使用CRM发送的名称、日期、时间等 我的术语可能太离谱了,希望您能提供指导 <?php $accountsid = 'XXXXXXXXXXXXXXX';// Your AccountSid $authtoken = 'XXXXXXXXXX';// Your authtoken $to = 'XXXXXXXXXX'; // Your business ca
<?php
$accountsid = 'XXXXXXXXXXXXXXX';// Your AccountSid
$authtoken = 'XXXXXXXXXX';// Your authtoken
$to = 'XXXXXXXXXX'; // Your business call phone you wish to have sms forwarded too
$from = 'XXXXXXXXXX'; // Your Message360 number
$content = "Hi ".$_POST[host].", this is just a reminder that we have a meeting scheduled for ".$_POST[time]." at ".$_POST[location]."";//content of the SMS
$tocountrycode = 1;
$fromcountrycode = 1;
$url = "https://api.message360.com/api/v2/sms/sendsms.xml";
$username = $accountsid;
$password = $authtoken;
$post = array(
'body' => $content,
'to' => $to,
'from' => $from,
'tocountrycode' => $tocountrycode,
'fromcountrycode' => $fromcountrycode);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_USERPWD, $username.":".$password);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch,CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, count($post));
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$post_response = curl_exec($ch);
// Checks for Errors
if (curl_errno($ch) > 0)
{
$error = curl_getinfo($request);
echo "ERROR: <BR>";
print_r($error);
$_SESSION['curl_error'] = curl_getinfo($ch);
$_SESSION['gnc_order_error'] = TRUE;
}
curl_close($ch);
exit;
?>