GithubHelp home page GithubHelp logo

erp-mgroen / sms_ru Goto Github PK

View Code? Open in Web Editor NEW

This project forked from korvinko/sms_ru

0.0 3.0 0.0 83 KB

PHP-класс для работы с api сервиса sms.ru

License: MIT License

PHP 100.00%

sms_ru's Introduction

sms_ru

PHP-класс для работы с api сервиса sms.ru

Использование

Подключение класса:

require_once 'src/Zelenin/smsru.php';

Простая авторизация (с помощью api_id):

$sms = new \Zelenin\smsru( $api_id );

Усиленная авторизация (с помощью api_id, логина и пароля):

$sms = new \Zelenin\smsru( $api_id, $login, $password );

Усиленная авторизация (с помощью логина и пароля):

$sms = new \Zelenin\smsru( null, $login, $password );

Отправка SMS:

$sms->sms_send( '79112223344', 'Текст SMS' );
$sms->sms_send( '79112223344,79115556677,79118889900', 'Текст SMS' );
$sms->sms_send( '79112223344', 'Текст SMS', 'Имя отправителя', time(), $translit = false, $test = true, $partner_id );

$messages = array(
	array( '79112223344', 'Текст СМС' ),
	array( '79115556677', 'Текст СМС' )
);
$sms->multi_sms_send( $messages, 'Имя отправителя', time(), $translit = false, $test = true, $partner_id );

Отправка SMS через e-mail:

$sms->sms_mail( '79112223344', 'Текст SMS' );
$sms->sms_mail( '79112223344', 'Текст SMS', 'Имя отправителя' );

Статус SMS:

$sms->sms_status( 'SMS id' );

Стоимость SMS:

$sms->sms_cost( '79112223344', 'Текст SMS' );

Баланс:

$sms->my_balance();

Дневной лимит:

$sms->my_limit();

Отправители:

$sms->my_senders();

Проверка валидности логина и пароля:

$sms->auth_check();

Добавить номер в стоплист:

$sms->stoplist_add( '79112223344', 'Примечание' );

Получить номера стоплиста:

$sms->stoplist_get();

Удалить номер из стоп-листа:

$sms->stoplist_del( '79112223344' );

Автор

Александр Зеленин, e-mail: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.