Oh it is easier than thought. Just use the PC/SC library, there's even an interface to PHP.
I have done the same thing with a POS software (I write my own, and use smartcards for authentication). Mail me at marco@m-s-d.eu and I'll send you the source code for the smartcard interface so you have a bit of a start.