mirror of
https://github.com/pcsc-for-php/pcsc.git
synced 2026-08-09 05:19:26 +02:00
Initial commit of the PC/SC (pcsc) extension. There is some stuff that needs to be romoved like the build.sh script and the subfolders tmp/ and php/.
I think the .m4 file has some bugs because it fails to build without my weird build.sh script. I will fix that ASAP. git-svn-id: https://svn.php.net/repository/pecl/pcsc/trunk@320951 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
230d4052b2
commit
8db0824d92
11 changed files with 1306 additions and 0 deletions
43
php/test.php
Normal file
43
php/test.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/* Just a test script for checking the implementation... */
|
||||
|
||||
if (!extension_loaded('pcsc')) {
|
||||
dl('pcsc.so');
|
||||
}
|
||||
|
||||
include("./pcsc.class.php");
|
||||
|
||||
$foo = new PCSC();
|
||||
|
||||
echo "Create Context:\n";
|
||||
var_dump($foo->context);
|
||||
|
||||
echo "List Readers:\n";
|
||||
var_dump($foo->listreaders());
|
||||
|
||||
echo "Connect Card:\n";
|
||||
var_dump($foo->connect("OMNIKEY CardMan 5x21 00 01"));
|
||||
|
||||
#echo "Reconnect:\n";
|
||||
#var_dump($foo->reconnect());
|
||||
|
||||
echo "Some Transmits:\n";
|
||||
var_dump($foo->transmit("00a4040c0cD2760001354B414E4D30310000"));
|
||||
var_dump($foo->transmit("0084000008"));
|
||||
var_dump($foo->transmit("0084000008"));
|
||||
var_dump($foo->transmit("0084000008"));
|
||||
|
||||
echo "Is Valid Context?\n";
|
||||
var_dump($foo->isvalidcontext());
|
||||
|
||||
echo "Status:\n";
|
||||
var_dump($foo->status());
|
||||
|
||||
echo "Disconnect Card:\n";
|
||||
var_dump($foo->disconnect());
|
||||
|
||||
echo "Release Context:\n";
|
||||
var_dump($foo->releasecontext());
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue