From 6508c449843f114effd6be03392570f0563ad17c Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Sun, 21 Feb 2021 07:50:36 +0100 Subject: [PATCH] Content update --- README.md | 9 ++++++++- docs/examples/simple.php | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff2b4b7..f6375a4 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,17 @@ array(3) { } ``` -### scard_connect($context, "OMNIKEY CardMan 5x21 00 00"); +### scard_connect($context, "OMNIKEY CardMan 5x21 00 00" [, int $protocol]); Connects to a card. Returns the $connection to a reader or FALSE. +Where optional $protocol is: + + * 1 = T=0 + * 2 = T=1 + +Default $protocol is T=1. + ### scard_reconnect($connection); Returns the $connection to a reader or FALSE. diff --git a/docs/examples/simple.php b/docs/examples/simple.php index 6e7094c..87c0c5a 100644 --- a/docs/examples/simple.php +++ b/docs/examples/simple.php @@ -39,7 +39,7 @@ echo "\n"; # Connect to the card echo ">> Connect to Card\n"; -$connection = scard_connect($context, $reader); +$connection = scard_connect($context, $reader, 1); var_dump($connection); $errno = scard_last_errno(); @@ -73,6 +73,17 @@ $errstr = scard_errstr($errno); var_dump($errstr); echo "\n"; +# Show Status +echo ">> Show Status\n"; +$status = scard_status($connection); +var_dump($status); + +$errno = scard_last_errno(); +var_dump($errno); +$errstr = scard_errstr($errno); +var_dump($errstr); +echo "\n"; + # Release the PC/SC context echo ">> Release Context\n"; scard_release_context($context);