smsapi.mwalczyk.pl / php-client
Library for communicating with provider
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 41
pkg:composer/smsapi.mwalczyk.pl/php-client
This package is not auto-updated.
Last update: 2025-10-21 11:21:45 UTC
README
Klient PHP pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl
<?php require_once 'smsapi/Autoload.php'; $client = new \SMSApi\Client('login'); $client->setPasswordHash( md5('super tajne haslo') ); $smsapi = new \SMSApi\Api\SmsFactory(); $smsapi->setClient($client); try { $actionSend = $smsapi->actionSend(); $actionSend->setTo('600xxxxxx'); $actionSend->setText('Hello World!!'); $actionSend->setSender('SMSAPI.pl'); $response = $actionSend->execute(); foreach( $response->getList() as $status ) { echo $status->getNumber() . ' ' . $status->getPoints() . ' ' . $status->getStatus(); } } catch( \SMSApi\Exception\SmsapiException $e ) { echo 'ERROR: ' . $e->getMessage(); }
Wymagania
- PHP >= 5.3
- allow_url_fopen lub rozszerzenie curl