• en
    • fr
Contact : +33(0)4.13.41.50.70
  • en
    • fr

2 Way SMS

Fields of application

Name Definition
message_id Ticket of the original message
number Mobile number
text Text of the response
answer_date Date of when the response was received, in the format “Ymd H:m:s” (Y-m-d H:i:s)

The request fields can also been sent as an array

 

Simple PHP recovery script example.

$fp = fopen(‘callbacks.txt’, ‘a’);

fputs($fp, ‘message_id : ‘ . $_POST[‘message_id’] . “n”);
fputs($fp, ‘number : ‘ . $_POST[‘number’] . “n”);
fputs($fp, ‘text : ‘ . $_POST[‘text’] . “n”);
fputs($fp, answer_date : ‘ . $_POST[answer_date] . “n”);

fclose($fp);

Simple sample of PHP scratching, with arrays, in your script

$fp = fopen(‘callbacks.txt’, ‘a’);

$message_ids = $_POST[‘message_id’];
$numbers = $_POST[‘number’];
$texts = $_POST[‘text’];
$answer_dates = $_POST[answer_date];

for($i=0, $i < count($messages_ids); $i++)
{
fputs($fp, ‘message_id : ‘ . $message_ids[$i] . “n”);
fputs($fp, ‘number : ‘ . $numbers[$i] . “n”);
fputs($fp, ‘text : ‘ . $texts[$i] . “n”);
fputs($fp, answer_date : ‘ . $answer_dates[$i] . “n”);
}

fclose($fp);