esms/ideacurl
最新稳定版本:v2.0.2
Composer 安装命令:
composer require esms/ideacurl
包简介
Official PHP SDK for the IDEACURL eSMS Gateway
README 文档
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.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-10