2017 © Pedro Peláez
 

package smsintel-api

A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.

image

seregazhuk/smsintel-api

A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.

  • Monday, June 5, 2017
  • by seregazhuk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

SmsIntel PHP Api

SmsIntel PHP Api , (*1)

, (*2)

Library provides common interface for making requests to both XML and JSON smsintel API., (*3)

Dependencies

Library requires CURL extension and PHP 5.5.9 or above., (*4)

Installation

Via Composer:, (*5)

composer require seregazhuk/smsintel-api

Quick Start

// You may need to amend this path to locate composer's autoloader
require('vendor/autoload.php'); 

use seregazhuk\SmsIntel\SmsIntel;

$sender = SmsIntel::create('login', 'password');

// send sms
$result = $sender->send('phoneNumber', 'From', 'Your message text');

Sending messages

To send message to one phone number:, (*6)

$result = $sender->send('phoneNumber', 'From', 'Your message text');

You can pass an array of phones:, (*7)

$phones = [
 '79999999999'
 '79999999991'
 '79999999992'
];
$result = $sender->send($phones, 'From', 'Your message text');

Cancel sms by id:, (*8)

$result = $sender->cancel($smsId);

Request a source name:, (*9)

$result = $sender->requestSource('FromPHP');

Groups and contacts

Get contact info by phone number:, (*10)

$contact = $sender->getPhoneInfo('79999999999');

Get all contacts:, (*11)

$contacts = $sender->getContacts();

Contacts for specific group:, (*12)

$groupId = 1;
$contacts = $sender->getContacts($groupId);

Contacts by phone number:, (*13)

$phone = '79999999999';
$contacts = $sender->getContacts(null, $phone);

// or with group:
$groupId = 1;
$contacts = $sender->getContacts($groupId, $phone);

Create a new contact:, (*14)

$contactInfo = [
    'idGroup' => 1 // required
    'phone'   => '79999999999' // required
    'f'       => 'Second Name',
    'i'       => 'First Name',
    'o'       => 'Middle Name',
    'bday'    => 'YYYY-mm-dd',
    'sex'     => 1 // 1 - male, 2 - female
];
$result = $sender->addContact($contactInfo);

Remove contact by phone number:, (*15)

$sender->removeContact('79999999999');

You can pass optionally group id:, (*16)

$groupId = 1;
$sender->removeContact('79999999999', $groupId);

Get all groups:, (*17)

$groups = $send->getGroups();

Get group by id or name:, (*18)

$groups = $sender->getGroups($groupId);
$groups = $sender->getGroups(null, $groupName);

Create a new group of contacts:, (*19)

$result = $sender->createGroup('NewGroup');

Edit group name by id:, (*20)

$result = $sender->editGroup($newName, $groupId);

Account

Get account info:, (*21)

$result = $sender->getAccountInfo();

Get balance:, (*22)

$result = $sender->getBalance();

Use discount coupon:, (*23)

$result = $sender->checkCoupon('couponCode');

Only check discount coupon:, (*24)

$result = $sender->checkCoupon('couponCode', false);

Reports

Get report for period by phone number:, (*25)

$result = $sender->getReportByNumber($dateFrom, $dateTo, '79999999999');

Get report for period and for all numbers:, (*26)

$result = $sender->getReportByNumber($dateFrom, $dateTo);

Get report by smsId:, (*27)

$result = $sender->getReportBySms($smsId);

Get report for period by source:, (*28)

$result = $sender->getReportBySource($dateFrom, $dateTo, 'FromPHP');

Get report for period for all sources:, (*29)

$result = $sender->getReportBySource($dateFrom, $dateTo);

How can I thank you?

Why not star the github repo? I'd love the attention!, (*30)

Thanks!, (*31)

The Versions

05/06 2017

dev-master

9999999-dev

A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zhuk Sergey

php lib smsintel

26/05 2017

0.2.0

0.2.0.0

A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zhuk Sergey

php lib smsintel

26/05 2017

dev-develop

dev-develop

A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zhuk Sergey

php lib smsintel

01/08 2016

0.1

0.1.0.0

PHP library to send sms via SmsIntel service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zhuk Sergey

php lib smsintel