php 用php向手机发送短信
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18758536/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
sms text messages to mobile phone in php
提问by mutago
Can someone provides with the tutorial on how to send sms text messages to mobile phone with 11-digit phone number and not 10-digit phone number using any free gateway?
有人可以提供有关如何使用任何免费网关向具有 11 位电话号码而不是 10 位电话号码的手机发送短信的教程吗?
Or is there any way I can develop my own using php?
或者有什么方法可以使用php开发我自己的?
Thank you.
谢谢你。
回答by Shankar Damodaran
You need to have an SMS API Providerto achieve what you are trying to do. The API Provider even gives you a readymade PHP code for making the calls to their API.
您需要有一个SMS API 提供程序来实现您想要做的事情。API 提供者甚至为您提供了现成的 PHP 代码,用于调用他们的 API。
Also,
还,
Have a look at TextMagicand there is a wrapper available here
Something like this
像这样的东西
$api = new TextMagicAPI(array(
"username" => "your_user_name",
"password" => "your_API_password",
));
$text = "Hello world!";
$phones = array(9991234567);
$is_unicode = true;
$api->send($text, $phones, $is_unicode)