abhishekphp6 Posted May 4, 2010 Share Posted May 4, 2010 Hello, How can I send SMS to mobile phone using PHP? Please point me to a tutorial for achieving this. Also, what software will be needed to do this? Link to comment https://forums.phpfreaks.com/topic/200629-send-sms-to-mobile-from-php/ Share on other sites More sharing options...
anups Posted May 4, 2010 Share Posted May 4, 2010 have a look at http://www.clickatell.com/ SMS gateway Link to comment https://forums.phpfreaks.com/topic/200629-send-sms-to-mobile-from-php/#findComment-1052822 Share on other sites More sharing options...
Grandioso Posted September 28, 2010 Share Posted September 28, 2010 Anyone knows a free SMS gateway ? Link to comment https://forums.phpfreaks.com/topic/200629-send-sms-to-mobile-from-php/#findComment-1116664 Share on other sites More sharing options...
WatsonN Posted September 28, 2010 Share Posted September 28, 2010 Just use a PHP mailer script and use this for the address http://www.makeuseof.com/tag/email-to-sms/ Link to comment https://forums.phpfreaks.com/topic/200629-send-sms-to-mobile-from-php/#findComment-1116900 Share on other sites More sharing options...
Rifts Posted September 28, 2010 Share Posted September 28, 2010 just do this this is easiest way to send sms THE FORM <form id="sms" name="sms" method="post" action="scripts/send_sms.php"> <table width="400"> <tr> <td align="right" valign="top">From:</td> <td align="left"><input name="from" type="text" id="from" size="30" /></td> </tr> <tr> <td align="right" valign="top">To:</td> <td align="left"><input name="to" type="text" id="to" size="30" /></td> </tr> <tr> <td align="right" valign="top">Carrier:</td> <td align="left"><select name="carrier" id="carrier"> <option value="verizon">Verizon</option> <option value="tmobile">T-Mobile</option> <option value="sprint">Sprint</option> <option value="att">AT&T</option> <option value="virgin">Virgin Mobile</option> </select></td> </tr> <tr> <td align="right" valign="top">Message:</td> <td align="left"><textarea name="message" cols="40" rows="5" id="message"></textarea></td> </tr> <tr> <td colspan="2" align="right"><input type="submit" name="Submit" value="Submit" /></td> </tr> </table> </form> the EXE script: <?php $from = $_POST['from']; $to = $_POST['to']; $carrier = $_POST['carrier']; $message = stripslashes($_POST['message']); if ((empty($from)) || (empty($to)) || (empty($message))) { header ("Location: sms_error.php"); } else if ($carrier == "verizon") { $formatted_number = $to."@vtext.com"; mail("$formatted_number", "SMS", "$message"); // Currently, the subject is set to "SMS". Feel free to change this. header ("Location: sms_success.php"); } else if ($carrier == "tmobile") { $formatted_number = $to."@tomomail.net"; mail("$formatted_number", "SMS", "$message"); header ("Location: sms_success.php"); } else if ($carrier == "sprint") { $formatted_number = $to."@messaging.sprintpcs.com"; mail("$formatted_number", "SMS", "$message"); header ("Location: sms_success.php"); } else if ($carrier == "att") { $formatted_number = $to."@txt.att.net"; mail("$formatted_number", "SMS", "$message"); header ("Location: sms_success.php"); } else if ($carrier == "virgin") { $formatted_number = $to."@vmobl.com"; mail("$formatted_number", "SMS", "$message"); header ("Location: sms_success.php"); } ?> Link to comment https://forums.phpfreaks.com/topic/200629-send-sms-to-mobile-from-php/#findComment-1116927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.