2017 © Pedro Peláez
 

library websmscom-php

A lightweight PHP-client-library for using websms.com SMS services.

image

websms-com/websmscom-php

A lightweight PHP-client-library for using websms.com SMS services.

  • Tuesday, April 24, 2018
  • by reifi
  • Repository
  • 3 Watchers
  • 0 Stars
  • 961 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 168 % Grown

The README.md

              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)

  1. Create sms client (once), (*9)

    $smsClient = new WebSmsCom_Client($username, $pass, $gateway_url);, (*10)

  2. Create message, (*11)

    $message = new WebSmsCom_TextMessage($recipientAddressList, $utf8_message_text);, (*12)

  3. 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.10: Added SmsCount property to WebSmsCom_Response (thanks to AlexHoebart-ICPDR)
  • Version 1.0.9: Tested functionality with PHP 8.4.3; Fixes missing class property causing deprecation note on dynamic property.
  • Version 1.0.8: Tested functionality with PHP 8.0.5, removes deprecated and unnecessary defaultValue for $pass argument in WebSmsCom_Client constructor
  • Version 1.0.7: Restored compatibility to PHP 5.0.3+ (removes PHP7 style scalar type hinting)
  • Version 1.0.6: Access token support
  • Version 1.0.5: Composer / Packagist support
  • Version 1.0.4: Throws WebSmsCom_ParameterValidationException on json_encode() errors to prevent body being 'null' or 'false'. Before this change an empty content body resulted in an API exception with status code 4120
  • Version 1.0.3: Fixed setter setHttpClient and setSenderAddressType
  • Version 1.0.2: Fixed error where long message content could not be sent because some curl/php versions set "Expect:" HTTP Header.
  • Version 1.0.1: Fixed setter setMessageContent()
  • 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)

The Versions

24/04 2018

dev-master

9999999-dev

A lightweight PHP-client-library for using websms.com SMS services.

  Sources   Download

MIT

The Requires

  • php >=5.2

 

by Gerd Reifenauer