Reputation: 153
Hi just wanted to ask If anyone knows or has experience in using an NFC ACR122U with PHP/JAVASCRIPT having a bit of a problem implementing it.
I have installed it on my pc and having a hard time getting inputs. It's working right now and if i hover a rfid card it shows that it reads it, But I don't know how to manage to get an input from a php driven website. *Note I have no experience with external devices using PHP. Ex. bar code scanner,printer. etc.
Would appreciate any help. From my searches I still haven't found any guides that would help my situation.
Upvotes: 3
Views: 4403
Reputation: 9138
As Charles has stated, PHP is server side and Javascript is client side. You have not stated which side you want to put the ACR122U (client or server?).
For client side integration (Javascript) you cannot access the device directly with Javascript. You will need to create a signed Java applet to run in your webpage. This applet will access the ACR122U using the Java Smart Card API and can also interface with the javascript on your page. See "Other Resources"->"Java" on this page.
I don't know too much about PHP and smarcard access but this library looks promising.
Also, I have a feeling that you may have expected the reader to work like a keyboard and just output the contents of whatever card is presented, kind of like mag stripe readers and barcode readers. This is not the case, it is actually more complex than that. You must send commands known as APDU's to the card to request the information you want.
If you can elaborate on you requirements then maybe I can help a little better.
** EDIT ** Javascript can run on server side these days too :)
Upvotes: 2