How to link access card reader with PHP?

udaya picture udaya · Mar 3, 2010 · Viewed 18.3k times · Source

I want to use an access card reader with PHP. I am doing this to monitor attendance at a college. Is there any intermediate technology which can be used to take the readings from access card reader to the database?

Answer

AngeloS picture AngeloS · Mar 13, 2012

I know I'm late to this question, but I'm building a similar product. This is in fact possible with a simple card reader contrary to the other answers. USB based card readers act as simple keyboard input devices, so when a person is ready to swipe, make sure that a text box is in focus and then swipe.

From there, you can take the keyboard data that is read and push it to a hidden input box and then process it server side (or even client side with some JavaScript). I'm using a lot of jQuery to make things a little more seamless on the client side, so it's not as straightforward as I'm describing, but it's definitely possible.

Here's a .NET example that you can use to port to PHP

EDIT: 2/2016

I created a GitHub Gist with a very simple jQuery implementation.