拨号Windows串行调制解调器从PHP

我试图拨打从PHP电话号码(我有一个数据库中的客户名单,并认为我可以用它来敲响他们,当我点击他们的名字

这里是我的代码,它似乎没有工作。 我可以听到电话线的点击,但似乎没有拨号。 也许我错过了一些需要在atdt之前发送的命令?

$device = "COM4"; exec("mode $device BAUD=9600 PARITY=n DATA=8 STOP=1 xon=off octs=off rts=on"); $comport = fopen($device, "r+b"); if ($comport === false) { die ("Failed opening com port"); } else { echo "Com Port Open"; } stream_set_blocking($comport, 0); $atcmd = "ATDT222222222222\r"; // dial fake number if (fwrite($comport, $atcmd ) === false) { die ("Failed writing to com port"); } else { echo "Wrote $atcmd to com port"; } sleep(10); // added fix to make program work, was closing port too soon for it to dial fclose($comport); 

Solutions Collecting From Web of "拨号Windows串行调制解调器从PHP"