How to write PHP Client for accessing HTTP
interface of SMS Gateway?
Note:
For using HTTP interface of SMS Gateway you need Transport Layer
Security(TLS) protocol
version TLSv1.1 or TLSv1.2(the
recommended and latest one)
Steps
to check whether your system supports TLSv1.1 or TLSv1.2:
- 1) Run the following command on your
system curl --tlsv1.2
https://msdgweb.mgov.gov.in/esms/sendsmsrequest
2)
If you get message "GET Method Not Supported" then it is SUCCESS!!!
your system supports TLSv1.2 and you can use the below code by
uncommenting/commenting specified lines in the below given code
3) If step 1 is not successful then run the following
command
curl --tlsv1.1
https://msdgweb.mgov.gov.in/esms/sendsmsrequest
4) If you get message "GET Method Not Supported" then it is
SUCCESS!!! your system supports TLSv1.1 and you can use the below
code by uncommenting/commenting specified lines in the below given
code
5) If step 1 and 3 are not successful you need to upgrade
your openssl libraries for system to suppot TLSv1.1 or TLSv1.2
Click to download the PHP code file(Size:8KB)