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.

14th Jan 2023, 5:55 PM
Arif Nasery
2 Antworten
+ 1
Use the PHP exec() function to send AT commands to a GSM modem connected to your computer via a serial port.
14th Jan 2023, 10:24 PM
Calviղ
Calviղ - avatar
+ 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());
15th Jan 2023, 4:56 AM
Микола Федосєєв
Микола Федосєєв - avatar