最近、プリボ番号にSMSを受信しようとしています。外部のplivoからSMSを送信すると、それが送信され、plivoログのステータスが配信済みと表示されます。しかし、データをデータベースに保存する必要があります。コントローラー機能をトリガーしません。
すでに別の機能で SMS を送信しました。送信してデータベースに保存しましたが、誰かがこの番号に返信したときに問題が発生しました。
コントローラ機能:
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);
}
プリボアプリURL : http://xxxxxxx.com/receive_sms
メッセージメソッド: GET
Message Method : POST // 動作しません。
Codeigniter 設定: $config['allow_get_array'] = TRUE;
インプリボ ログ ステータスが配信されました。
助けはありますか?