[PHP] php 发送短信 →→→→→进入此内容的聊天室

来自 , 2019-02-10, 写在 PHP, 查看 135 次.
URL http://www.code666.cn/view/f9fd2624
  1. 调用 TextMagic API。http://www.textmagic.com/
  2.  
  3. // Include the TextMagic PHP lib  
  4. require('textmagic-sms-api-php/TextMagicAPI.php');  
  5.  
  6. // Set the username and password information  
  7. $username = 'myusername';  
  8. $password = 'mypassword';  
  9.  
  10. // Create a new instance of TM  
  11. $router = new TextMagicAPI(array(  
  12.     'username' => $username,  
  13.     'password' => $password
  14. ));  
  15.  
  16. // Send a text message to '999-123-4567'  
  17. $result = $router->send('Wake up!', array(9991234567), true);  
  18.  
  19. // result:  Result is: Array ( [messages] => Array ( [19896128] => 9991234567 ) [sent_text] => Wake up! [parts_count] => 1 )

回复 "php 发送短信"

这儿你可以回复上面这条便签

captcha