PHP send SMS

From , 5 Years ago, written in PHP, viewed 126 times.
URL https://pastebin.vip/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 )

Reply to "PHP send SMS"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website