我试图将消息或复制消息发送到另一个号码以进行twilio,但它似乎不起的作用
接收器:+12345678
twilio号码:+987654321
header('Content-Type: text/html');
?>
<Response>
<Message to="<?=$_REQUEST['+987654321']?>">
<?=htmlspecialchars(substr($_REQUEST['From'] . ": " . $_REQUEST['Body'], 0, 1600))?>
</Message>
</Response>
请求URL
http://domain.com/twillio.php?PhoneNumber=%2B12345678
参考https://www.twilio.com/help/faq/sms/how-do-i-forward-my-sms-messages-to-another-phone-number
有什么想法吗?
我唯一能想到的就是仔细检查数字格式,尤其是在使用国际数字的情况下。
您可以使用curl根据查找API检查它们,如下例所示:
curl -XGET "https://lookups.twilio.com/v1/PhoneNumbers/55-11-5525-6325?Type=carrier&Type=caller-name" -u "{AccountSid}:{AuthToken}"