如何使用Kannel发送通用短信

  • 本文关键字:何使用 Kannel php kannel
  • 更新时间 :
  • 英文 :


我使用这个方法,它工作得很好

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

现在它不工作,当我连接$text到text参数!

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

我不确定这是一个通道问题还是php问题!因为连接$number工作得很好!我在Linux上使用CakePHP 1.3和Xampp

尝试使用 urlencode () :

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

最新更新