douche3791
2014-08-17 16:16
浏览 220
已采纳

在php中通过twilio发送短信

i am trying to send sms via php, and i cant get what is my problem. my account is verified and premium (not free), and the require once url is correct, and i changed the accountSid and AuthToken ,

require_once('twilio-php-master/Services/Twilio.php'); // Loads the library

// set your AccountSid and AuthToken from www.twilio.com/user/account
$AccountSid = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy";
$AuthToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

$client = new Services_Twilio($AccountSid, $AuthToken);

$message = $client->account->messages->create(array(
    "From" => "+972527213871",
    "To" => "+972527213871",
    "Body" => "Test message!",
));

// Display a confirmation message on the screen
echo "Sent message {$message->sid}";

any help please?

图片转代码服务由CSDN问答提供 功能建议

我正在尝试通过php发送短信,我无法得到我的问题。 账号已经过验证, premium(不是免费的),一旦url是正确的,我更改了accountSid和AuthToken,</ p>

  require_once('twilio-php-master / Services / Twilio.php  “);  //加载库
 
 //设置您的AccountSid和AuthToken来自www.twilio.com/user/account
$AccountSid =“yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy”; 
 $ AuthToken =“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”; 
 
 $ client  = new Services_Twilio($ AccountSid,$ AuthToken); 
 
 $ message = $ client-&gt; account-&gt; messages-&gt; create(array(
“From”=&gt;“+972527213871”,
  “To”=&gt;“+ 972527213871”,
“正文”=&gt;“测试消息!”,
)); 
 
 //在屏幕上显示确认消息
echo“已发送消息{$  message-&gt; sid}“; 
 </ code> </ pre> 
 
 

是否有任何帮助?</ p> </ div>

2条回答 默认 最新

相关推荐 更多相似问题