Download the PHP package evp/gsms-php-client without Composer
On this page you can find all versions of the php package evp/gsms-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package gsms-php-client
GsmsPhpClient
What is GsmsPhpClient?
GsmsPhpClient is a helper-library, that will allow you to easily integrate sending SMS messages functionality into your website if you are in possession of an active Gsms.lt account with a positive balance.
In short: this is a wrapper for the existing Gsms.lt API - Download DOC format specification
Sections
- Requirements
- Installation
- Code samples
- Additional notes
- Contact Us
Requirements
- An active gsms.lt account
- PHP 5.1.2+
Installation
- Use
git clone https://github.com/evp/GsmsPHPClient.git
to copy the GsmsPHPClient directory to your project directory. - Add the following code to your PHP file where you intend to use the SMS send functionality:
This will ensure that all of the library's classes are properly loaded. Make sure you change the 'path/to' to the actual path of the GsmsPHPClient.
Congratulations, you have successfully installed GsmsPHPClient!
Code samples
Once you have installed the library, you are now ready to create a Gsms_Client
Where "username" and "password" are your gsms.lt account login and password accordingly.
Now use the client to send your first SMS message:
You are only allowed to send SMS from the numbers that have been added to your account via gsms.lt web interface, which means that you are not to specify a random telephone number as the first parameter of the send method.
Now check if the SMS you sent has completed without a hitch with the $response object that Gsms_Client::send method returns.
The $lastResponse string will provide feedback from the API and will help you debug any issues you might encounter.
Additional notes
Gsms_Client::send method will throw an exception if the response from the API is invalid. It is always a good idea to wrap a try-catch clause around your code in to anticipate such behaviour
Contacts
If you have any further questions feel free to contact us:
"EVP International", UAB
Mėnulio g. 7
LT-04326 Vilnius
Email: [email protected]
Tel. +370 (5) 2 03 27 19
Faksas +370 (5) 2 63 91 79