最近我试图收到短信给plivo号码。当我从outsite plivo发送短信时,它发送并显示plivo日志状态。但我需要将数据保存到数据库中。它不触发我的控制器功能。
我已经通过另一个函数发送了短信。它发送并保存到我的数据库,但问题是,当有人回复到这个数字。无法在plivo中接收到入站短信,它不会触发codeigniter网址
控制器功能:
public function index()
{
// Sender's phone numer
$from_number = $this->input->get("From"); // $this->input->post("From"); dosen't work.
// Receiver's phone number - Plivo number
$to_number = $this->input->get("To"); // $this->input->post("To"); dosen't work.
// The SMS text message which was received
$text = $this->input->get("Text"); // $this->input->post("Text"); dosen't work.
// Output the text which was received to the log file.
// error_log("Message received - From: ".$from_number.", To: ".$to_number. ", Text: ".$text);
$arr = array("from" => $from_number, "to" => $to_number, "text" => $text);
$this->receive_model->add($arr);
}
Plivo应用URL: http://xxxxxxx.com/receive_sms
消息的方法:GET
消息的方法:POST //这么想的工作。
笨配置: $配置[ 'allow_get_array'] = TRUE;
在交付的plivo日志状态。
有帮助吗?
已解决。谢谢。 –
如果你自己解决它,请自己发布答案。让别人看到。 – Iceman
你是如何解决它的? – CharlieC