vbnullchar Posted February 19, 2007 Share Posted February 19, 2007 how can i send a SMS using PHP? Link to comment https://forums.phpfreaks.com/topic/39131-php-and-sms/ Share on other sites More sharing options...
o3d Posted February 19, 2007 Share Posted February 19, 2007 Normally you would connect a GSM modem to a computer and write software to interface to the modem via a serial or network interface. This service/software can listen on a socket or poll a table which can be populated by a php script. When the service/software sees a new entry, it will pass the necessary serial comms to the GSM modem and voila. This is only one of many methods that can be used to send sms's. Please know that your GSM modem's sim card is dependant on a cellphone service provider. Link to comment https://forums.phpfreaks.com/topic/39131-php-and-sms/#findComment-188535 Share on other sites More sharing options...
lovemy7 Posted February 19, 2007 Share Posted February 19, 2007 Hi, The ISP's I use that have an SMS service treat it as a form and you pass the various components Here is the bones of one I have just implemented. //-----------------Build the body ------------------------------------------------------------ $smsBody = 'Invoice# '.$ThisNewInvoice."\n"; $smsBody .= $row_userDetail['title'].' '.$row_userDetail['firstName'].' '.$row_userDetail['surname'].' '."\n"; $smsBody .= 'Grand Total: '. number_format($grandtotal, 2, ".", ",").' '."\n"; //---------------------------------------SMS--------------------------------------------------------- include("includes/cHTTP.php");//---------------Class allows posting to a page without a form //--------------------------------------Set up SMS ----------------------------------------------------- $http = new cHTTP(); // clear all fields $http->clearFields(); $http->addField ( 'Login' , 'coc01' ); $http->addField ( 'password' , '**********' ); $http->addField ( 'page' , 'http://www.yourdomain.com/' ); $http->addField ( 'recipients' , '12345678910' ); $http->addField ( 'sms' , $smsBody ); $http->addField ( 'sender' , '27796085139' ); //-------------------------------------------Send SMS --------------------------------------------------- $http->postPage("http://yourserviceprovider.com/sms/sendsms.asp");//------------the ISP sms Page Link to comment https://forums.phpfreaks.com/topic/39131-php-and-sms/#findComment-188581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.