diff --git a/CREDITS b/CREDITS deleted file mode 100644 index 6f9c6d2..0000000 --- a/CREDITS +++ /dev/null @@ -1,2 +0,0 @@ -pcsc -Johann Dantant, Johannes Findeisen, Marco Schuster, Calvin Buckley diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 0000000..68ab9e7 --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,11 @@ +# Contributors + +## In alphabetical order: + + * Johann Dantant (Original author) + * Anatol Belski (Contributor) + * Calvin Buckley (Contributor) + * Remi Collet (Contributor) + * Johannes Findeisen (Maintainer) + * Marco Schuster (Contributor) + diff --git a/README.md b/README.md index 43ab2d3..de9fc05 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,96 @@ -
This is the only extension for using PC/SC based smart cards with PHP. It is a wrapper to the wonderful and free project by Ludovic Rousseau, PCSC-Lite, which is the middleware to access a smart card using SCard API (PC/SC). Since PCSC-Lite is compatible to the winscard API it should be possible to compile this extension using a Windows or macOS operating system.
+## About -Thanks are going to Johann Dantant! He provides a PC/SC extension for PHP since 2005 and I reused some of his code. He allowed me to relicense these parts under the terms of the PHP license so I could integrate PCSC-Lite natively into PHP.
+This is the only extension for using [PC/SC](http://www.pcscworkgroup.com/) based smart cards with [PHP](http://www.php.net). It is a wrapper to the wonderful and free project by Ludovic Rousseau, [PCSC-Lite](https://pcsclite.apdu.fr/), which is the middleware to access a smart card using SCard API (PC/SC). Since PCSC-Lite is compatible to the winscard API it should be possible to compile this extension using a Windows or macOS operating system. -I recommend to install the PECL extension the "PHP" way:
+## Installation -pecl install pcsc-beta+I recommend to install the PECL extension the "PHP" way: -
You can install the latest code by downloading the sources and compile yourself too.
+``` +pecl install pcsc-beta +``` -git clone https://github.com/pcsc-for-php/pcsc.git +You can install the latest code by downloading the sources and compile yourself too. + +``` +git clone https://github.com/pcsc-for-php/pcsc.git cd pcsc phpize ./configure make -make install+make install +``` -
After that you have all needed files in ./modules/
+After that you have all needed files in ./modules/ . -The extension currently provides the following API:
+The extension currently provides the following API: -Returns the application $context to the PC/SC resource manager.
+Returns the application $context to the PC/SC resource manager. -Returns TRUE if $context is valid or FALSE if $context is not valid.
+Returns TRUE if $context is valid or FALSE if $context is not valid. -Releases the application $context.
+Releases the application $context. -Returns an array of available readers or FALSE.
+Returns an array of available readers or FALSE. -array(3) {
- [0]=>
+```
+array(3) {
+ [0]=>
string(26) "OMNIKEY CardMan 5x21 00 00"
- [1]=>
+ [1]=>
string(26) "OMNIKEY CardMan 5x21 00 01"
- [2]=>
+ [2]=>
string(76) "SCL01x Contactless Reader [SCL01x Contactless Reader] (21161009200722) 00 00"
}
-
+```
-Connects to a card. Returns the $connection to a reader or FALSE.
+Connects to a card. Returns the $connection to a reader or FALSE. -Returns the $connection to a reader or FALSE.
+Returns the $connection to a reader or FALSE. -Disconnects the $connection to a card. Returns the TRUE if disconnecting was succesful or FALSE.
+Disconnects the $connection to a card. Returns the TRUE if disconnecting was succesful or FALSE. -Returns the response $apdu as string or FALSE.
+Returns the response $apdu as string or FALSE. -Returns the status or FALSE.
+Returns the status or FALSE. -This code is licensed under the terms of the PHP License version 3.01. PCSC-Lite is licensed in a way where it is possible to integrate it native in the PHP environment.
+This code is licensed under the terms of the PHP License version 3.01. PCSC-Lite is licensed in a way where it is possible to integrate it native in the PHP environment. -