Download the PHP package intis/sdk without Composer
On this page you can find all versions of the php package intis/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description SDK for SMS sending and getting API information
License MIT
Homepage https://github.com/intistelecom/Intis-Telecom-SDK-PHP
Informations about the package sdk
Intis-Telecom-SDK-PHP
The Intis telecom gateway lets you send SMS messages worldwide via its API. This program sends HTTP(s) requests and receives information as a response in JSON and/or XML. The main functions of our API include:
- sending SMS messages (including scheduling options);
- receiving status reports about messages that have been sent previously;
- requesting lists of authorised sender names;
- requesting lists of incoming SMS messages;
- requesting current balance status;
- requesting lists of databases;
- requesting lists of numbers within particular contact list;
- searching for a particular number in a stop list;
- requesting lists of templates;
- adding new templates;
- requesting monthly statistics;
- making HLR request;
- HLR запрос
- receiving HLR request statistics;
- requesting an operator’s name by phone number;
To begin using our API please apply for your account at our website where you can get your login and API key.
Install
Usage
class IntisClient - The main class for SMS sending and getting API information
There are three mandatory parameters that you have to provide the constructor in order to initialize. They are:
- $login - user login
- $apiKey - user API key
- $apiHost - API address
This class includes the following methods:
Use the getBalance()
method to request your balance status
To get a list of all the contact databases you have use the function getPhoneBases()
Our gateway supports the option of having unlimited sender’s names. To see a list of all senders’ names use the method getOriginators()
To get a list of phone numbers from a certain contact list you need the getPhoneBaseItems($baseId, $page)
method. For your convenience, the entire list is split into separate pages.
The parameters are: $baseId
- the ID of a particular database (mandator), and $page
- a page number in a particular database (optional).
To receive status info for an SMS you have already sent, use the function getDeliveryStatus($messageId)
where $messageId
- is an array of sent message IDs.
To send a message (to one or several recipients), use the function sendMessage($phone, $originator, $text)
,
where $phone
- is a set of numbers you send your messages to,
$originator
is a sender’s name and $text
stands for the content of the message.
An array includes MessageSendingSuccess
if the message was successfully sent or MessageSendingError
in case of failure.
To add a number to a stoplist run addToStopList($phone)
where $phone
is an individual phone number
To check if a particular phone number is listed within a stop list use the function checkStopList($phone)
, where $phone
is an individual phone number.
Our gateway supports the option of creating multiple templates of SMS messages. To get a list of templates use the function getTemplates()
.
As a response you will get a list of all the messages that a certain login has set up.
To add a new template to a system run the function addTemplate($title, $template)
where $title
is a name of a template, and $template
is the text content of a template
To get stats about messages you have sent during a particular month use the function getDailyStatsByMonth($year, $month)
where $year
and $month
- are the particular date you need statistics for.
HLR (Home Location Register) - is the centralised databas that provides detailed information regarding the GSM mobile network of every mobile user.
HLR requests let you check the availability of a single phone number or a list of numbers for further clean up of unavailable numbers from a contact list.
To perform an HLR request, our system supports the function makeHLRRequest($phone)
where $phone
is the array of phone numbers.
Besides, you can can get HLR requests statistics regarding a certain time range. To do that, use the function getHlrStats($from, $to)
where $from
and $to
are the beginning and end of a time period.
To get information regarding which mobile network a certain phone number belongs to, use the function getNetworkByPhone($phone)
, where $phone
is a phone number.
Please bear in mind that this method has less accuracy than HLR requests as it uses our internal database to check which mobile operator a phone numbers belongs to.
To get a list of incoming messages please use the function getIncomingMessages($date)
, where $date
stands for a particular day in YYYY-mm-dd format.
Exapmles:
- Send sms, balance, delivery src/examples/send.php
- Phone bases src/examples/base.php
- Phone bases items src/examples/baseItems.php
- Senders src/examples/senders.php
- Incoming messages src/examples/incoming.php
- Get network by phone src/examples/network.php
- Hlr requests and statistics src/examples/hlr.php
- Statistics usage src/examples/statistics.php
- Manage blocked phones src/examples/stopList.php
- Manage templates src/examples/template.php