<form id="shieldpass_form" method="post">
<?php
require_once('shieldpasslib.v2.php'); //*location must be entered by you
$shieldpass_public_key = "your_public_key"; //*must be entered by you
$shieldpass_secret_key = "your_secret_key"; //*must be entered by you
$shieldpass_user_id = "your_local_user_id"; //*must synchronize with user id
$shieldpass_trans_id = ""; //*optional 3 number transaction id
if (($_POST["shieldpass_user_id"]!="")&&($_POST["shieldpass_user_response"]!="")) {
$resp = shieldpass_check_answer($shieldpass_public_key,
$shieldpass_secret_key,
$_POST["shieldpass_user_id"],
$_POST["shieldpass_user_response"]);
if (!$resp->is_valid) {
// Response is incorrect
die("Response is incorrect.<br />Detail : ".$resp->detail." ");
} else {
// Your code for successful authentication, such as validating your user session
echo "Response is correct.<br />".$resp->detail;
}
}
echo shieldpass_get_html($shieldpass_public_key,
$shieldpass_secret_key,
$shieldpass_user_id,
$shieldpass_trans_id);
?></form>