hello, flks! I have a doubt... Is possible use php to access usb port on windows? because I spent some hours in google and I had not found anything... just to "com" port... and I tried some functions in my code like: dio_open, fopen, fwrite .... but these function run ok only with "com" (rs232) port... But usb is impossible I get errors all the time.... I wanna access a usb port cause I have a garmin gps ... and I'm wondering catch the data send by gps with php... to store in a db... will I need some dll to solve this problem??? I'm hoping for any suggestion... seeYa!
i think its not possible but u could try it using apache virtual host when a usb drive is attached it also gets an alphabet try to use that n see wat happens
It's an unusual request but I wouldn't be too surprised if it was possible. Even if accessing a usb post isn't possible with php directly you may be able to put something together with the exec function.
I remember I made a PHP script to randomly write files from a directory to my USB drive. I used the exec function and had to use a set drive letter though.
Via PHP you can not connect/edit/delete or even view the users computer files. Languages like PHP/ASP/JAVA are all server side. The only way to connect to the user's computer is by using vbscripts/applets and such. Peace,
azizny, I may be wrong but I think that tresloukadu was aiming to connect to a usb port on his server.
Really? I was under the impression that a USB port was a hardware port and not a tcpip port such as that used by fsockopen. Is it a new kind of USB (Universal Socket Bus? lol ) ;D BTW, about the original question, the answer maybe to develop a separate program that accesses USB and call it using exec() or develop a PHP extension ~ Thomas
And above all, if you don't mind why do you want to connect to your USB drive? My be the root cause can have some different solutions. PHP is a scripting language, not an operating system. Answer is NO-NO...