phporcaffeine Posted January 9, 2007 Share Posted January 9, 2007 My goal is to get PHP to interact with a USB device.I know there is no 'built-in' or 'standard' way to do this but I was hoping that someone would have an idea of classes & methods that I should look at.Would this have anything to do with sockets?-TIA Quote Link to comment https://forums.phpfreaks.com/topic/33468-using-php-an-unusual-way/ Share on other sites More sharing options...
HuggieBear Posted January 9, 2007 Share Posted January 9, 2007 PHP can be used to execute system calls, so if your USB device has a command line interface, you can call it using PHP by using the [url=http://uk.php.net/manual/en/function.system.php]system()[/url], [url=http://uk.php.net/manual/en/function.exec.php]exec()[/url] or [url=http://uk.php.net/manual/en/function.shell-exec.php]shell_exec()[/url] commands.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/33468-using-php-an-unusual-way/#findComment-156679 Share on other sites More sharing options...
phporcaffeine Posted January 9, 2007 Author Share Posted January 9, 2007 Right,I should have clarified, I'm looking at this from more of an API view. I am trying to do this on a serial level Quote Link to comment https://forums.phpfreaks.com/topic/33468-using-php-an-unusual-way/#findComment-156761 Share on other sites More sharing options...
magic2goodil Posted January 9, 2007 Share Posted January 9, 2007 [quote]As far as i know there are are few windows DLLs that allow you to read and write directly to a pc's parallel port, one is called Inpout32.dll whitch can be found at http://www.logix4u.net/ their website provides lots of usefull information on parallel port programming but in order to use that dll i believe inpout32.dll will have to be converted to a PHP extension so it can be used directly from php.If someone is willing to take the time to program that extension it can open up a many new applications for PHP-GTK such as data acquisition, motion control for robotics , home control and many other electronics related applications.Back to top clangeJoined: 24 Jan 2006Posts: 6 PostPosted: Mon May 15, 2006 8:10 am Post subject: Reply with quoteThere is a module for win32 api:http://de.php.net/manual/de/ref.w32api.phpWith this module you can call every function on a dll.mfg clange[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/33468-using-php-an-unusual-way/#findComment-156764 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.