esms/ideacurl

Official PHP SDK for the IDEACURL eSMS Gateway

Maintainers

Package info

github.com/ideacurl/ESMS-PHP

pkg:composer/esms/ideacurl

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.2 2026-06-10 09:30 UTC

This package is auto-updated.

Last update: 2026-06-10 09:30:20 UTC


README

Official PHP SDK for sending SMS messages through the IDEACURL eSMS Gateway.

Features

  • Simple and lightweight API
  • Send SMS in just a few lines of code
  • Custom sender ID (Mask) support
  • Built on Guzzle HTTP Client
  • PSR-4 compliant
  • PHP 8.2+ compatible

Installation

Install the package via Composer:

composer require esms/ideacurl

Requirements

  • PHP 8.2 or higher
  • Guzzle HTTP Client 7.x
  • IDEACURL eSMS API Key

Quick Start

<?php

require 'vendor/autoload.php';

use IDEACURL\SMS;

$sms = new SMS('YOUR_API_KEY');

$response = $sms->send(
    '94771234567',
    'Hello from IDEACURL SMS!'
);

print_r($response);

Send SMS with Custom Sender ID

<?php

require 'vendor/autoload.php';

use IDEACURL\SMS;

$sms = new SMS('YOUR_API_KEY');

$response = $sms->send(
    '94771234567',
    'Your OTP is 123456',
    'MYBRAND'
);

print_r($response);

API Reference

Constructor

new SMS(string $apiKey)
Parameter Description
apiKey Your IDEACURL eSMS API Key

Send SMS

send(
    string $phone,
    string $message,
    string $mask = 'IDEACURL'
): array
Parameter Description
phone Recipient phone number in international format
message SMS content
mask Sender ID / SMS Mask (optional)

Example Response

{
    "status": "success",
    "message": "SMS sent successfully"
}

Error Handling

try {
    $sms = new SMS('YOUR_API_KEY');

    $response = $sms->send(
        '94771234567',
        'Test Message'
    );
} catch (Exception $e) {
    echo $e->getMessage();
}

For technical support or API access, contact via info@ideacurl.com.

License

This project is licensed under the MIT License.