Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Отправляется GET-запрос по адресу:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessage.php

Пример:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessage.php?login=ЛОГИН&password=ПАРОЛЬ&phone=ТЕЛЕФОН&send_viber=1&sender_viber=ИМЯ_ОТПРАВИТЕЛЯ_ВАЙБЕР&text_viber=ТЕКСТ_ВАЙБЕР&button_text=ТЕКСТ_КНОПКИ&button_url=ССЫЛКА_КНОПКИ&image_url=ИЗОБРАЖЕНИЕ&send_sms=3&sender_sms=ИМЯ_ОТПРАВИТЕЛЯ_СМС&text_sms=ТЕКСТ_СМС&validity_period_viber=60&finale_viber_read=0&send_vk=2&templateId=100&templateData={"Name":"Имя","Where":"Москва"}

...

Отправляетя GET-запрос по адресу:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessage.php

Пример:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessage.php?login=ЛОГИН&password=ПАРОЛЬ&id_message=ID_СООБЩЕНИЯ

...

Адрес сервера:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessagejson.php

JSON-документ:

...

Адрес сервера:

Code Block
https://имя_хостаclk.prontosms.ru/sendmessagejson.php

JSON-документ:

...

Code Block
languagephp
$src = '<?xml version="1.0" encoding="utf-8"?>
<request>
<security>
<login value="логин" />
<password value="пароль" />
</security>
</request>';
// XML-документ
$href = 'https://serverclk.prontosms.ru/script.php'; // адрес сервера
$ch = curl_init();
curl_setopt ($ch, CURLOPT_HTTPHEADER, array ('Content-type: text/xml','charset=utf-8','Expect:'));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_CRLF, true);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $src);
curl_setopt ($ch, CURLOPT_URL, $href);
$result = curl_exec($ch);
curl_close($ch);
echo $result;

...

Адрес сервера:

Code Block
https://имя_хостаclk.prontosms.ru/xml/message.php

XML-документ:

...

Адрес сервера:

Code Block
https://имя_хостаclk.prontosms.ru/xml/state_message.php

XML-документ:

...