Php script can not send sms, but super terminal can!

Php script can not send sms, but super terminal can! SearchSearch
Author Message
guaerjia
New member
Username: Guaerjia

Post Number: 4
Registered: 04-2006
Posted on Tuesday, September 05, 2006 - 04:35 am:   

Hi,
I have a GSM modem(wavecom), I can use super terminal to send sms:

AT+CMGS="+8613167343373"<CR>hello,world<CTRL+Z><CR>

it works fine!

but now, i use php script to send sms, i have some trouble, it can't work.

<?php
set_time_limit(0);

exec('mode COM1: baud=115200 data=8 stop=1 parity=n xon=on');
$fd = dio_open('COM1:', O_RDWR);
$ff = dio_stat($fd)
if(!$fd) { die("failed open com1"); }
dio_write($fd,"AT+CMGS=\"+8613167343373\"".chr(13)."hello,world".chr(26).chr(13) );
dio_close($fd);
?>