NetGsm API is an open source library created using the API documentation of NetGsm firm. With this library developed with PHP, you can send Sms, voice Sms etc. to your users. You can do the operations.
To use this application you must already have a NetGsm account and that api operations must be accessible. You can contact NetGsm for further information.
Ensure that your server meets the following requirements.
It is very simple to use and you will be ready to use it with just a few operations. To use this library Composer is required.
composer require greencheap/library-netgsm
Net Gsm API gives you component structure, this allows you to escape unnecessary cost and is targeted.
require('./vendor/autoload.php'); use GreenCheap\NetGsm; $netgsm = new NetGsm(3120000000 , 0000);
The NetGsm class expects you to enter 3 parameters;
(It is not mandatory)birlikte onaylanmış gönderici başlığı
The above example shows that you are ready to use this library. For subsequent operations you can use the NetGsm API components.
This component helps you implement the Sms transactions that Netgsm gives you.
require('../vendor/autoload.php'); use GreenCheap\NetGsm; use GreenCheap\Components\SmsFoundation; $netgsm = new NetGsm(3120000000 , 0000); $smsFoundation = new SmsFoundation($netgsm); $smsFoundation->sms('5550000000' , 'Hello World! I am GreenCheap'); $msg = $smsFoundation->run(); print_r($msg);
During sending operations, you can see the 'Error' error in the 'Status' key in the outputs. As a result, it shows you that things have gone wrong. The full documentation on this topic is given below.
||It means that it cannot be sent due to a problem in the message text or that it exceeds the standard maximum number of message characters.|
||Indicates an invalid user name, password or that your user does not have API access permission.In addition if you have limited IP access to the API and provide sending outside of the IP that you have limited you will receive error code 30. You can control your API access permission or IP restriction from the web interface , in the settings> API operations menu in the upper-right corner.|
||Indicates that your message header (Sender Name) is not defined in the system. You can check your sender names by querying them with the API.|
||Erroneous interrogation. One of the parameters you send is incorrect or one of the required fields is missing.|
We'll let you know about new announcements, publications and everything else on our social media accounts.
Contact us directly at email@example.com