Код: Выделить всё
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);
как я могу разбить строку, например.
Как я могу разбить строку, например.
р>
Код: Выделить всё
"Hi,
This is the message"
кто-то может помочь?
спасибо
Подробнее здесь: https://stackoverflow.com/questions/784 ... n-json-php
Мобильная версия