Download the PHP package quince/kavenegar-client without Composer

On this page you can find all versions of the php package quince/kavenegar-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kavenegar-client

Kavenegar PHP Client

A php client for connecting to kavenegar.com api for sending sms.

Installation

You must then modify your composer.json file and run composer update to include the latest version of the package in your project.

Or you can run the composer require command from your terminal.

Usage

Laravel integration

Laravel 5.1 and above is supported in this package.

Add the following line to your laravel config/app.php:

Then run the following in your command line

A config file named kavenegar.php can be found in config folder. Configure you api key and default sender number if you want.

Laravel usage

By using laravel service provider you can automatically bindthe Client in your classes constructor.

Methods description

Client::send()

Send a message to specified receptor phone number.

Parameters type description
receptor string|string[] receptor or receptors phone number
message string The text to send
date int (optional) Setting the time to send the message in timestamp
type int (optional) Type of the sms look here
localId string (optional) Custom id for message
sender string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action

more info

Client::bulkSend()

Send bulk messages to multiple receptor phone numbers.

Parameters type description
receptors string[] receptors phone number
message string|string[] The text or texts to send, if array of texts passed, number of texts and receptors should be equal, and each text will send to corresponding receptor
date int (optional) Setting the time to send the message in timestamp
type int|int[] (optional) Type of the sms look here
localId string|string[] (optional) Custom id for message
sender string|string[] (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action

more info

Client::getMessageStatus()

Get status of a sent message by its message id.

Parameters type description
messageId string|string[] Message id that given to you when sent a message

more info

Client::getMessageStatusByLocalId()

Get status of a sent message by local id set when sending.

Parameters type description
localId string|string[] Message id you set when sending a message

more info

Client::getMessageDetail()

Get details of a message by message id.

Parameters type description
messageId string|string[] Message id you set when sending a message

more info

Client::getOutbox()

Get all sent message in specified date range (max 3000 message).

Parameters type description
startDate int Start date in timestamp
endDate int (optional) End date in timestamp
sender string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action. If you sent message from multiple line number set sender number as set it 0 to bring outbox of all sender numbers.

more info

Client::getRecentOutbox()

Get list of recent sent messages (max 3000 messages).

Parameters type description
pageSize int (optional) number of message per request.
sender string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action. If you sent message from multiple line number set sender number as set it 0 to bring outbox of all sender numbers.

more info

Client::getOutboxCount()

Get count of sent message in specified range.

Parameters type description
startDate int Start date in timestamp
endDate int (optional) End date in timestamp
sender string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action. If you sent message from multiple line number set sender number as set it 0 to bring outbox of all sender numbers.

more info

Client::cancelMessage()

Canceling a pending message from sending.

Parameters type description
messageId string Message id that given to you when sent a message

more info

Client::getInbox()

Get list of received messages (100 messages per each request).

Parameters type description
onlyRead bool (optional) If set to true only read messages would fetched
line string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action. If you sent message from multiple line number set sender number as set it 0 to bring outbox of all sender numbers.

more info

Client::getInboxCount()

Get count of messages in inbox.

Parameters type description
startDate int Start date in timestamp
endDate int (optional) End date in timestamp
line string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action. If you sent message from multiple line number set sender number as set it 0 to bring outbox of all sender numbers.
onlyRead bool (optional) If set to true only read messages would fetched

more info

Client::phoneCountByPostalCode()

Get count of phone numbers in a postal code area, categorized by oprator.

Parameters type description
postalCode string Postal code for an area

more info

Client::sendByPostalCode()

Send message to phone numbers in a postal code area.

Parameters type description
postalCode string Postal code for an area
message string Text message to send
mciStartIndex int Start index of MCI receptors, if set to -1 receptor selects randomely
mciCount int Count of message to send to MCI receptors, if set to 0 (and start index set to 0 too) will send to all
mtnStartIndex int Start index of MTN receptors, if set to -1 receptor selects randomely
mtnCount int Count of message to send to MTN receptors, if set to 0 (and start index set to 0 too) will send to all
date int (optional) Time to send in timestamp format
sender string (optional) senders number, if it is set while building client no need to feel this. the given number will overwrite the default number for this action

more info

Client::getAccountInfo()

Get information of an account.

more info

Client::getAccountConfigs()

Get configuration of an account.

more info

Client::setAccountConfigs()

Set configuration of an account.

Parameters type description
configs array list of changing configurations in an array
Config type description
apilogs string Status of logging API requests; values: justfaults (default), enabled, disabled
dailyreport string Status of daily report; values: enabled, disabled
debugmode string Status of debiging/testing mode, when enabled message sending will be mocked; values: enabled, disabled
defaultsender string The default sender number
mincreditalarm int The limit to alert when the credit is about to finish
resendfailed string Whether try to redend when sending failed or not; values: enabled, disabled

more info

Client::sendVerificationCode()

Send vrification code, password, authorization code, etc.

Parameters type description
receptor string Receptor phone number
token string Verification code, password, or the token
template string Template name you set in your panel

more info


All versions of kavenegar-client with dependencies

PHP Build Version
Package Version
Requires curl/curl Version ^1.3
illuminate/support Version ~5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quince/kavenegar-client contains the following files

Loading the files please wait ....