Daevid Vincent wrote: > I'll confess that I've done almost zero research on this topic as of right > now aside from pricing readers and blank cards. > > So we're opening a new super-club here in Seattle. One of the ideas we'd > like to pursue is that people are assigned a card. This can be a magstripe > card or something with a barcode. Not really sure at the moment which way > to go. > > The idea being that when they enter, we "swipe/scan" their card and we can > log stats (# of visits, # guests, favorite drink so the bar has it ready, > enter into contest, etc.) I was thinking we setup a simple netbook with a > USB reader at the front door when they pay. Then we have another back at > the bar. Connect via WiFi. Have a notebook somewhere behind the scenes that > runs LAMP (or a VM thereof). No internet needed. The backend database and > even web/GUI stuff is of course trivial with any LAMP stack. > > What I don't know is how do I interface _to_ PHP from say a magstripe > reader. They're dirt cheap ($50), but I assume come with zero software. > http://www.kanecal.net/mag-stripe-reader-scanner.html . And there are > hundreds of these gadgets out there all the same basically. > > I guess what I'm hoping for is some pointers, from someone who's done this > sort of thing. > > My gut thought is something so simple, where there is some XP software (or > Linux I suppose) that reads the card (and generally they only have a number > encoded on them) and this is sent via a URL we define, such as > http://192.168.10.100/door.php?id=123456 or > http://192.168.10.100/bar.php?id=123456 etc. (ignore the security issues > and all that. It's trivial to encode the parameters, plus it's a closed > system with WEP/WPA/WTF). But does anyone know of such a key piece of code? > > Like I said, I'm not locked into magcards. It could be a barcode reader > just as easily. Or fingerprint scanner, or facial recognition. In the end > it's just a unique "thing" that maps to a unique number. I just need the > "FM" (F*ckin' Magic -- it's a programmer term -- look it up!) that goes in > between PHP and the hardware. > > http://daevid.com > > "Some people, when confronted with a problem, think 'I know, I'll use > XML.'" > Now they have two problems. > As someone else pointed out, many of these readers come with software that automatically enters data into an input field (where the cursor is) when a card is swiped. So you have a PHP web app on your LAMP box that the other netbooks point to. When they swipe the card it inputs into the text field and uses an onchange() to submit the form and redisplay the form, or have other fields that need to be populated (guests, etc.). I haven't done it, but seems simple enough. You just need to figure out what you'll use. Maybe driver's license since you need that anyway at a club (at least in the U.S.). -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php