can we invoke h/w with php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

can we invoke h/w with php?

Post by itsmani1 »

Hello every one....
i have a question, can we invoke hardware using (php 4.1),i am not talking about any specfic h/w its about general.if we can plz. tell me the way.

Thanx.
Mannan.
User avatar
AnarKy
Forum Contributor
Posts: 119
Joined: Tue Nov 02, 2004 1:49 am
Location: South Africa

Post by AnarKy »

Hi itsmani1,
can we invoke hardware using (php 4.1)
I think that "invoke" is a relative term in this case. What are you trying to do?
It is easy enough to embed JavaScript code in php to access printers, etc.

Please elaborate on your post.
Thanks.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You can connect to a serial interface using fsockopen() .. and I think you can connect to a USB device doing something similar too.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

You can even let your modem dial out ;) (here is a linux example)

Code: Select all

$fp = fopen('/dev/modem', 'rw');
fwrite($fp, 'ATDT0032498311488');
fclose($fp);
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

okies thanks ppl for you time.....

Thanx.
Post Reply