--
You received this message because you are subscribed to the Google Groups "envayasms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envayasms+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envayasms/c6994c46-697d-4897-9fd5-77751646ce86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Sergiu;Have you set properly your header ?Your content type must be application/json.It’s just a way, I’m not sure it’s the solution.
Le mer. 22 mai 2019 à 15:25, Sergiu <srj...@gmail.com> a écrit :
Don't know if anybody can still answer my question but I'll try anyway:I almost finished my server for EnvayaSMS and even though I can send messages and send logs to the phone successfully I still receive "Error in server response: End of input at character 0 of" in the phone app logs when querying for new messages.My responses:for action=outgoing:{ "events": [ { "event": "send", "messages": [ { "id": "1", "to": "000", "message": "mes1" }, { "id": "2", "to": "000", "message": "mes2" }, { "id": "3", "to": "000", "message": "mes3" } ] } ] }for action=send_status:{"events":[{"event":"log","message":"Message with id: x was removed from database"}]}Anybody can tell me what's going on?Thank you,--
You received this message because you are subscribed to the Google Groups "envayasms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enva...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envayasms/c6994c46-697d-4897-9fd5-77751646ce86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
foreach ($messages as $message) { //Looping through all messages that are to be sent
//Creating the Object with messages
$Obj = new stdClass();
$Obj->id = $message['id'];
$Obj->to = $message['tel'];
$Obj->message = "message";
array_push($mesArray, $Obj);
}
$Obj = new stdClass();
//Creating the entire response
$Obj->events = array(array("event" => "send", "messages" => $mesArray));
$json = json_encode($Obj);
echo $json; //Sending the response
$Obj = new stdClass();
$Obj->events = array(array("event" => "log", "message" => "some message to log"));
echo json_encode($Obj);