On form submission we run this chunk of code :
//Define String to send, use chr(13) for line feed
sms = "title".chr(13)."description";
//Require php Serial Class
$serial = new phpSerial;
//Open up connection to the GSM Modem
$serial->deviceSet("COM5");
$serial->deviceOpen();
//send command to GSM Modem, chr(26) is carriage return where the message ends.
$serial->sendMessage("at+cmgs=\"+6598776625\"\r\n",1);
$serial->sendMessage($sms.chr(26));
//release and close the device
$serial->deviceClose();
That's all for sending sms in Windows, you can retrieve data from database and put it into the string to send as sms too.
As for receiving sms, we fail to execute it in Windows using phpSerial. Instead we use Java to retrieve the sms and store to the joomla content database. Take a look here => http://smslib.org Labels: sms php
Responses
0 Respones to "SMS Functionality"
Post a Comment