使用PHP发送短信

时间:2014-03-29 07:14:32

标签: php sms

应用程序必须通过SMS提醒用户。不具体。

  • 需要在世界任何地方发送短信。
  • 如何使用PHP发送

我必须付钱,我知道我已经准备好了。

  • 我不知道选择短信网关服务器

请参考我的一些短信网关服务器(良好的服务)来依赖。谢谢。

2 个答案:

答案 0 :(得分:1)

你可以选择textmagic。 http://www.textmagic.com/许多选项通过电子邮件发送短信,短信发送电子邮件......以及更多......

答案 1 :(得分:0)

//------START OF SMS--------------  

//Code using fopen  
error_reporting(0);  

//Change your configurations here.  
//---------------------------------  
$message=your message;  

$username="username";  
$password="password";  
$sender="SENDER";  
$domain="example.com";  
$priority="A"; //"A- Promotional SMS,  T-Transactional SMS"  
$mobile=mobile number;  

$username=urlencode($username);  
$password=urlencode($password);  
$sender=urlencode($sender);  
$message=urlencode($message);  

$parameters="username=".$username."&password=".$password."&sendername=".$sender."&mobile=".$mobile."&message=".$message."&routetype=".$priority;  

$fp = fopen("http://$domain/SMS_API/sendsms.php?$parameters", "r");  

$response = stream_get_contents($fp);  
fpassthru($fp);  
fclose($fp);  

//-----END OF SMS----------