A lightweight PHP-client-library for using websms.com SMS services.
W E B S M S . C O M P H P T O O L K I T
What is it?, (*1)
A lightweight PHP-client-library for using websms.com SMS services. Reduces the complexity of network-communication between client and SMS gateway, to help business-customer save time and money for focusing on their business logic., (*2)
Installation, (*3)
Include WebSmsCom_Toolkit.inc into your PHP File in order to access the classes and methods for sending text and binary SMS., (*4)
// will need JSON.phps (Service_JSON) for PHP<5.2.0 include "WebSmsCom_Toolkit.inc";`
For PHP versions lower than 5.2.0 please make sure that JSON.phps is in the same directory as WebSmsCom_Toolkit.inc or install Services_JSON from PEAR., (*5)
or install with Composer, (*6)
composer require websms-com/websmscom-php
Example, (*7)
See send_sms.php on how to send messages, (*8)
Create sms client (once), (*9)
$smsClient = new WebSmsCom_Client($username, $pass, $gateway_url);
, (*10)
Create message, (*11)
$message = new WebSmsCom_TextMessage($recipientAddressList, $utf8_message_text);
, (*12)
Send message, (*13)
$Response = $smsClient->send($message, $maxSmsPerMessage, $test);
, (*14)
Documentation, (*15)
The documentation available as of the date of this release is included in send_sms.php and WebSmsCom_Toolkit.inc., (*16)
FAQ, (*17)
Question: Why do I get a CURLOPT_SSL_VERIFYHOST error?, (*18)
`curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead`
Answer: Just set $smsClient->setSslVerifyHost(2), (*19)
// 1.) -- create sms client (once) ------ $smsClient = new WebSmsCom_Client($username, $pass, $gateway_url); $smsClient->setSslVerifyHost(2);
Changelog, (*20)
Version 1.0.0: Basic text- and binary-sms-sending., (*21)
Contact, (*22)
For any further questions into detail the contact-email is developer@websms.com, (*23)