0
Hi How can I send at command from php to a GSM modem. I try to send messages to phone numbers using php with GSM modem.
2 Réponses
+ 1
Use the PHP exec() function to send AT commands to a GSM modem connected to your computer via a serial port.
+ 1
include "php_serial.class.php";
$serial = new PhpSerial;
$serial->deviceSet("COM3");
$serial->confBaudRate(9600);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial->confStopBits(1);
$serial->confFlowControl("none");
$serial->deviceOpen('w+');
$serial->sendMessage("AT",1);
sleep(1);
var_dump($serial->readPort());