FlexCode SDK
Sample Code For PHP
- latest update: 19/03/2015
- by: FlexCode SDK
Thank you for purchasing our product. If you have any questions that are beyond the scope of this help file, please feel free to contact us.
/demo_flexcodesdk
(Sample Pages...)
/assets
/css
/font
/image
/js
/database
demo_flexcodesdk.sql (Sql file import to your database server)
/include
function.php (Customize PHP function for this sample)
global.php (Customize global setting for this sample)
head.php
After you download sample code from our website http://www.flexcodesdk.com/ extract the file into your web server and you can see the files looks like files structure in the page before.
-
Open global.php inside folder /include/global.php
$base_path customize this line with your sample code url.
$db_name customize this line with your database name.
$db_user customize this line with your database user.
$db_pass customize this line with your database user password.
$time_limit_reg customize this line with number (used for show the register interface for fingerprint).
$time_limit_ver customize this line with number (used for show the login interface for fingerprint).
You can add and delete device in the device menu.
You can add, delete, register fingerprint or login user menu in the User menu.
- Please set FlexCodeSDK.exe always run as admin
- FlexCodeSDK.exe located in the System folder of Windows (System32 for 32bit, SysWow64 for 64bit)
- Turn off the UAC (User Account Control) in Control Panel
Step by step fingerprint enrollment process :
- Click Register button, it call external protocol FlexCodeSDK.exe and send the url to get enrollment paramaters
- FlexCodeSDK.exe will run and request the input parameters on the url (register.php).
- Web server respond the request 'echo "$user_id;SecurityKey;".$time_limit_reg.";".$base_path."process_register.php;".$base_path."getac.php";'
- $user_id is User ID
- SecurityKey is a strings to encrypt the template, please use the same SecuriKey when verify the template.
- $time_limit_reg is a numeric in second, how long the FlexCodeSDK.exe will run for enrollment process.
- $base_path."process_register.php;" is url to send the result of enrollment process.
- $base_path."getac.php" is url to get activation code, the activation code will store in device.ini file.
- User scanned the finger at least 4 times in given time, if not the enrollment process fails.
- If the enrollment process is success, FlexCodeSDK.exe send the template to the url $base_path."process_register.php;".
- In $base_path."process_register.php;" you can tell FlexCodeSDK.exe to open a new page or not. Please see the image code below
You can login user in the Login menu. When the verication success, it will open a new page.
- Please set FlexCodeSDK.exe always run as admin
- FlexCodeSDK.exe located in the System folder of Windows (System32 for 32bit, SysWow64 for 64bit)
- Turn off the UAC (User Account Control) in Control Panel
Step by step fingerprint verification process :
- Click Login button, it call external protocol FlexCodeSDK.exe and send the url to get verification paramaters
- FlexCodeSDK.exe will run and request the input parameters on the url (verification.php).
- Web server respond the request 'echo "$user_id;".$finger[0]['finger_data'].";SecurityKey;".$time_limit_ver.";".$base_path."process_verification.php;".$base_path."getac.php".";extraParams";'
- $user_id is User ID. FlexCodeSDK for web only support 1 to 1 verification.
- $finger[0]['finger_data'] is user's fingerprint template.
- SecurityKey is a strings to decrypt the template, please use the same SecuriKey when enroll the template.
- $time_limit_reg is a numeric in second, how long the FlexCodeSDK.exe will run for verification process.
- $base_path."process_verification.php;" is url to send the result of verification process.
- $base_path."getac.php" is url to get activation code, the activation code will store in device.ini file.
- extraParams is to give a Transaction ID, this ID is used to determine the verification is done for which transaction.
- User scanned the finger in given time, if not the verification process fails.
- If the verification process is success, FlexCodeSDK.exe send the template to the url $base_path."process_verification.php;".
- In $base_path."process_verification.php;" you can tell FlexCodeSDK.exe to open a new page or not. Please see the image code below
You can view the log information of login user in this Log menu.