dcs-pl / hostedsms-php
HostedSMS API PHP
1.1.0
2024-05-16 07:30 UTC
Requires
- php: >=7.4
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-09-16 08:29:10 UTC
README
PHP API Client HostedSMS.pl SimpleAPI and WEBSERWIS2SMS API
HostedSMS.pl API documentation
Requirements
php >= 7.4
composer (https://getcomposer.org/)
Install package with dependencies
composer require dcs-pl/hostedsms-php
SimpleApi
Send SMS
require 'vendor/autoload.php'; use HostedSms\SimpleApi\HostedSmsSimpleApi; $simpleApi = new HostedSmsSimpleApi($userEmail, $password); $response = $simpleApi->sendSms($sender, $phone, $message);
WebService API
Create client
require 'vendor/autoload.php'; use HostedSms\WebService\HostedSmsWebService; $client = new HostedSmsWebService($userEmail, $password);
Send SMS
$response = $client->sendSms($phone, $message, $sender, $transactionId);
Send multiple SMSes
$response = $client->sendSmses($phones, $message, $sender, $transactionId);
Get all valid senders for user
$response = $client->getValidSenders();
Get delivery reports
$response = $client->getDeliveryReports($messageIds);
Get unread delivery reports
$response = $client->getunreadDeliveryReports();
Get received smses
$response = $client->getInputSmses($from, $to, $recipient, $markAsRead);
Get unread received smses
$response = $client->getUnreadInputSmses();
Check if phone numbers are valid
$response = $client->checkPhones($phones);
Convert text to GSM7
$response = $client->convertToGSM7($text);
Get customer info
$response = $client->customerInfo();