/    Sign up×
Community /Pin to ProfileBookmark

SMS through attached phone

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);
[/code]

Thanks for your effort
Lubox

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@LuboxauthorApr 30.2007 — I found Gammu, which seems to help me do what I need at the moment.

Gammu can be found here

I will try to find better solutions later...
×

Success!

Help @Lubox spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...