dcs-pl/hostedsms-php

HostedSMS API PHP

1.0.0 2023-10-02 13:46 UTC

This package is auto-updated.

Last update: 2023-12-02 14:37:53 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);