4
Contributors
4
Replies
19
Views
6 Years
Discussion Span
Last Post by swatisharma08
1

If in case the SMS Gateway allows sending SMSes by a accessing a simple url with authentication etc params ( example:, http://<some third party sms gateway domain.com>/index.php?username=john@smith.com&password=randompassword&to=9876543210&message=testmessage)

then this all you need is
1. a simple html form
2. which can post the message
3. to a php script which can make a CURL call to the SMS Gateway URL

sample code for a CURL call

$url = "http://somethirdpartysmsgatewaydomain.com/index.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=john@smith.com&password=randompassword&to=9876543210&message=testmessage');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
echo $result;

Anyways, this is just A solution in case the SMS Gateway is operating in the above assumed fashion
Beyond this it would help checking out with the SMS gateway provider itself as to how all of this needs to be integrated

Any more info from them here would help

0

If in case the SMS Gateway allows sending SMSes by a accessing a simple url with authentication etc params ( example:, http://<some third party sms gateway domain.com>/index.php?username=john@smith.com&password=randompassword&to=9876543210&message=testmessage)

then this all you need is
1. a simple html form
2. which can post the message
3. to a php script which can make a CURL call to the SMS Gateway URL

sample code for a CURL call

$url = "http://somethirdpartysmsgatewaydomain.com/index.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=john@smith.com&password=randompassword&to=9876543210&message=testmessage');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
echo $result;

Anyways, this is just A solution in case the SMS Gateway is operating in the above assumed fashion
Beyond this it would help checking out with the SMS gateway provider itself as to how all of this needs to be integrated

Any more info from them here would help

Ok.. Thanks for your reply. Now i'm deling with the SMS gateway provider for the API.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.