Pricing plans  Services  API  Partners  About the service  Contacts 
8 (800) 700 7672
Free in Russia
 

Integration with the service (API)

The API allows you to send messages through your projects and services over HTTP/HTTPS, SMTP and SMPP protocols. Ready-made libraries in different programming languages connect to your project and help you send messages from anywhere with a single command. For simplified authorization, instead of a login and password pair, you can use a special API key.


HTTP/HTTPS SMTP SMPP SOAP OMS SMS Commands Libraries and code examples

Form for sending SMS messages

To send SMS messages from your site, you can use the following example of an HTML form and the corresponding A PHP script that processes the data of this form.


Phone


Message


The sender


Set aside until
(dd. mm. yy hh:mm)

Transliteration Flash-SMS


The source code of the form: <html>
<
form method="post" action="send.php">

Телефон<br/><input name="phone" value=""><br/><br/>

Сообщение<br/><textarea name="message" rows="4" cols="40"></textarea><br/><br/>

Оправитель<br/><input name="sender" value=""><br/><br/>

Отложить до<br/><input name="time" value=""> (дд.мм.гг чч:мм)<br/><br/>

<
input type="checkbox" name="translit">Транслит
<input type="checkbox" name="flash"> Flash SMS<br/><br/>

<
input type="submit" name="send" value="Отправить">
</
form>
</
html>

A send.php file that processes form data and uses the library smsc_api.php: <?
if ($_POST["send"]) {
include_once
"smsc_api.php";

$r = send_sms($_POST["phone"], $_POST["message"],
$_POST["translit"], $_POST["time"], 0,
$_POST["flash"], $_POST["sender"]);

// $r = array(<id>, <количество sms>, <стоимость>, <баланс>) или array(<id>, -<код ошибки>)

if ($r[1] > 0)
echo
"Сообщение отправлено";
else
echo
"Произошла ошибка № ", -$r[1];
}
?>



© 2003–2024 SMS Center LLC
support@smscentre.com
Contacts
Design — Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica