Hi
I have an application for checking our internal systems, which will send SMS through a mobile phone (nokia) connected on the COM1 port when stuff is down or up again, certain thresholds reached etc.
This application is written in another language and now I have to rewrite this application to PHP. The old application is using a windows dll (not mine!) to send SMS with, but I am unable to get it to work with PHP (using Winbinder to call functions in dll’s).
So, I’m looking for some help in using PHP to send SMS through this phone. Maybe you know of a free COM object I could use, or something else?
I found this code somewhere on the web, but the author had not managed to get it to work himself (maybe someone sees obviously mistakes, I know nothing of such communications);
[code=php]
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=”+555555555″”.chr(13).”hello,world”.chr(26).chr(13) );
dio_close($fd);
Thanks for your effort
Lubox