I am lucky to say, that my PHP extension for using Smart Cards based on the winscard API was successful released on pecl.php.net. It is designed for the use with the wonderful project PCSC-Lite for *nix. Since PCSC-Lite is implementing the API compatible to the PC/SC standard it should be possible to compile this code on other operating systems too.

I have created this extension in 2010 but needed to clean it up and do some long term tests. It runs nicely on some machines and now you are able to do Smart Card terminal prototyping using PHP. I am using this extension to run Smart Card devices on the server side for enabling communication with Secure Application Modules (SAM) / Hardware Security Modules (HSM).

The name of the extension is "pcsc". There is only a small subset of the API implemented but for most things this is enough. I will implement the full API at any time.

More information:

To checkout the code you need to execute the following command:

svn checkout http://svn.php.net/repository/pecl/pcsc/trunk pcsc

Thanks to the PHP developers who helped me doing this step and for commenting my code.

Comments