In order to display LottoCaptcha on your website, and validate it through LottoCaptcha API.
You will need to get
<public> and
<private> API keys.
To display LottoCaptcha, simply add this Javascript line :
<script type="text/javascript" src="http://api.lottocaptcha.com/draw/?h=your_public_key"> </script>
in
you want to protect.
Replace
<your_public_key> with your LottoCaptcha public key.
This Javascript line will query LottoCaptcha API server, pick random lottery numbers and display LottoCaptcha widget.
Message |
Description |
Key not valid |
Public key is not valid. |
Status not active |
Publisher status is inactive. |
Can not serve lottery |
Undefined error. |
LottoCaptcha script will query LottoCaptcha API server to validate entered numbers against LottoCaptcha winning numbers.
If numbers match, user will see “Congratulation” message and will proceed with prize claim procedure.
LottoCapcha staff will contact publisher with prize claim details.
Otherwise (numbers do not match winning numbers).
You will need to validate the user response,by reading fallowing fields submitted in <form> from user web page to your web server.
Fields list: |
lottocaptcha_challenge_field |
lottocaptcha_response_field |
add
your_private_key |
User's IP address |
And pass these fields in POST request to
http://api.lottocaptcha.com/varify/
Then read LottoCaptcha API response.
Return Value |
Description |
true |
User's respone was correct. |
false |
User's respone was incorrect. |
PrivateKey_Required |
We didn't receive your private key. Please set PrivateKey POST parameter. |
ChallengeValue_Required |
We didn't receive lottocaptcha_challenge_field value . Please set &ChallengeValue POST parameter . |
ResponseValue_Required |
We didn't receive lottocaptcha_response_field value . Please set &ResponseValue POST parameter . |
RemoteIp_Required |
We didn't receive user's IP address . Please set &RemoteIp POST parameter . |
ChallengeValue_Invalid |
We received invalid lottocaptcha_challenge_field value. Please check your POST parameters. |
PrivateKey_Invalid |
We received invalid private key. Please make sure you set correct key. |
RemoteIp_Invalid |
User's IP adress is invalid. User security check failed. |
Already_Checked |
We already checked this LottoCaptcha challenge before. |