Hi,
I need help on sending sms from my website to the registered users using mysmsmantra sms api. I have no idea on doing this, if any code to do this that is greatly appreciatable…
Thanks !
Hi,
I need help on sending sms from my website to the registered users using mysmsmantra sms api. I have no idea on doing this, if any code to do this that is greatly appreciatable…
Thanks !
Just run a request to their API
http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=username&password
=password&sendername=sender id&mobileno=919999999999&message=Hello
–>
[php]<?php
$smsApi = array(
‘username’ => ‘your API username here’,
‘password’ => ‘your API password here’,
‘sender_name’ => ‘The name that should be displayed as sender’
);
$sendTo = ‘users phone number’;
$sendMsg = ‘message’;
$result = file_get_contents(‘http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=’.$smsApi[‘username’].’&password=’.$smsApi[‘password’].’&sendername=’.$smsApi[‘sender_name’].’&mobileno=’.$sendTo.’&message=’.$sendMsg);[/php]
read more: http://www.mysmsmantra.com/api.html
Using file get contents to fetch external sites may not work, if so you need to do a curl request.
http://codular.com/curl-with-php