Page 1 of 1

can we invoke h/w with php?

Posted: Mon Aug 01, 2005 3:39 am
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.

Posted: Mon Aug 01, 2005 5:46 am
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.

Posted: Mon Aug 01, 2005 8:25 am
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.

Posted: Mon Aug 01, 2005 12:11 pm
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);

Posted: Tue Aug 02, 2005 1:46 am
by itsmani1
okies thanks ppl for you time.....

Thanx.