A PHP library for sending SMS messages using PhilSMS. Visit PhilSMS to get your API key!
Require the package using Composer:
composer require jaydoesphp/philsms-php
This library provides an easy way to interact with the PhilSMS API to send SMS messages and retrieve account details.
POST /sms/send
Parameter | Type | Description |
---|---|---|
recipient |
string |
Recipient phone number(s) in philippine format (e.g., 639123456789 ). |
message |
string |
The SMS message content. exclude any vulgar words |
sender_id (optional) |
string |
Sender ID (default: PhilSMS ). |
type (optional) |
string |
Message type (plain or unicode ). |
require 'vendor/autoload.php';
use Jaydoesphp\PhilsmsPhp\Client;
$client = new Client('your-api-key');
$response = $client->send('639123456789', 'Hello! This is a test message.');
print_r($response);
require 'vendor/autoload.php';
use Jaydoesphp\PhilsmsPhp\Client;
$client = new Client('your-api-key');
$response = $client->send(
'639123456789, 639987654321',
'Hello! This is a message sent to multiple recipients.'
);
print_r($response);
$response = $client->profile();
print_r($response);
$response = $client->balance();
print_r($response);
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
This package is licensed under the MIT License.
For any questions or inquiries, please contact [email protected].