Download the PHP package itexmo/itexmo-sms without Composer

On this page you can find all versions of the php package itexmo/itexmo-sms. 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 itexmo-sms

Itexmo SMS Gateway for Laravel

Itexmo SMS Gateway Integration for Laravel is a package that allows you to send SMS messages using the Itexmo API in your Laravel applications. It provides a simple and clean API for sending text messages, checking SMS credits, and broadcasting messages to multiple recipients.

Table of Contents

Installation

You can install the package via Composer:

After installation, the package will automatically register its service provider and facade.

Configuration

To use the Itexmo package, you need to set up your Itexmo credentials in the Laravel environment configuration file (.env).

Add the following lines to your .env file:

Next, publish the package configuration:

This will create a configuration file config/itexmo.php where you can manage your Itexmo settings.

Usage

Sending SMS

To send an SMS message to a single or multiple recipients, use the broadcast() method provided by the ItexmoSms class.

Example:

Checking SMS Balance

You can check your current SMS balance using the checkBalance() method. This will return the remaining credits in your Itexmo account.

Example:

Broadcasting SMS with OTP

To send OTP (One-Time Password) to a single or multiple recipients, you can use the broadcastOTP() method.

Example:

Sending Two-Dimensional Broadcast

To send multiple messages to different recipients, you can use the broadcast2d() method. This allows you to send different messages to different phone numbers.

Example:

Available Endpoints

  1. Broadcast SMS (broadcast)

    • Sends an SMS message to multiple recipients.
    • Parameters:
      • recipients (array): An array of phone numbers.
      • message (string): The message to send.
    • Example:
  2. Check Balance (query)

    • Retrieves the current SMS balance for the account.
    • Parameters: None
    • Example:
  3. Broadcast OTP (broadcast-otp)

    • Sends an OTP (One-Time Password) to multiple recipients.
    • Parameters:
      • recipients (array): An array of phone numbers.
      • message (string): The OTP message to send.
    • Example:
  4. Two-Dimensional Broadcast (broadcast-2d)
    • Sends different messages to different recipients.
    • Parameters:
      • messages (array): A two-dimensional array where each element contains a recipient number and the message.
    • Example:

Error Handling

All responses from the Itexmo API are handled within the methods. The responses are returned as arrays with the following keys:

You can easily check if a request was successful by checking the success key.

Example:

Testing the Package

You can test the package using Postman or any other API testing tool. Simply set up an endpoint that triggers one of the available methods (e.g., broadcast, checkBalance) and call it via an HTTP request.

Example API Route for SMS Broadcast

Testing via Postman

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

License

This package is open-sourced software licensed under the MIT license.


All versions of itexmo-sms with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
guzzlehttp/guzzle Version ^6.5
illuminate/support Version 5.8.*
vlucas/phpdotenv Version ^3.3
laravel/framework Version 5.8.*
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 itexmo/itexmo-sms contains the following files

Loading the files please wait ...