i’m using follow code to send a messages to gateway sms.
‘ curl_setopt($ch, CURLOPT_URL, ‘https://urlgateway’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, “{ “message”: “Hi, “. “This is the message”,
“phoneNumbers”: [“phone sender”, “phone target”] }”);
curl_setopt($ch, CURLOPT_USERPWD, ‘username’ . ‘:’ . ‘password’);
$headers = array();
$headers[] = ‘Content-Type: application/json’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
‘
As you can see message is single line ” Hi, This is a test message”
how can i brake the line for ex.
“Hi,
This is the message”
i’d try to add n but get error about json parse body..
someone can help?
thanks