开发者

How to send a generic SMS using Kannel

I开发者_运维问答 use this Method, and it works fine

$url = "http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=".$number."&text=Send";
$urloutput=file_get_contents($url);

now it doesn't work when i concatenate $text to the text parameter!

$url = "http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=".$number."&text="." ".$text."lol'";

I'm not sure if this is a kannel issue or php issue ! since concatenating $number works just fine ! I'm using CakePHP 1.3 on Linux and Xampp


Try using urlencode():

$url = "http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=".$number."&text=".urlencode($text);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜