Skip to content

Klient napisany w języku PHP, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl

License

Notifications You must be signed in to change notification settings

mwalczykpl/smsapi-php-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-client

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

LICENSE

Apache 2.0 License

About

Klient napisany w języku PHP, pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%