Let consumers choose how to engage with ads
and enjoy them!

Resources

Plugins

minteye API Overview

Welcome to our resources page! Here you'll find documentation and examples of how to embed an minteye in your websites.
This documentation is designed for people who are familiar with HTML and server-side processing.
API keys
In order to add minteye to your website, you'll need to get unique API keys.
Using the API keys, we identify your website on each CAPTCHA request/validation.
Sign up now for your API keys. It's FREE!
Getting started
Once you've got your API keys, all you have to do are simply two steps:
1. Display the minteye on your form (client-side).
2. Validate the user's answer when form is being processed (server-side).

We recommend you check out our plugins before doing it yourself.
How the minteye API works
minteye integration
  • The user loads your website form with the minteye widget (JavaScript code).
  • The JavaScript code requests an minteye challenge. The user is exposed to the minteye.
  • The user fills out your website form (includes minteye answer) and clicks submit.
  • Your server sends the user's answer to minteye's servers, which checks the user's answer and sends back a response.
  • If correct, proceed with your process. If incorrect, display an error to the users and generate a new minteye challenge.
Important connection issue
Make sure your server can establish a connection to minteye's servers.
Some application servers define outbound firewall restriction which could cause connectivity faults.
Related posts
Interesting CAPTCHA
CAPTCHA news
We recommend you check out our plugins before doing it yourself.

Display the CAPTCHA

Displaying minteye on your website is extremely simple!
All you have to do is add this code in your <form> where you want it to be displayed.
Replace your_captcha_id and your_public_key with your API codes.
Replace random_dummy with a random number (generated in each load of your page).
<script type='text/javascript'
    src='http://api.minteye.com/Get.aspx?CaptchaId=your_captcha_id&PublicKey=your_public_key&Dummy=random_dummy'></script>
<noscript>
    <iframe src='http://api.minteye.com/NoScript.aspx?CaptchaId=your_captcha_id&PublicKey=your_public_key&Dummy=random_dummy'
        width='300' height='100' frameborder='0'></iframe>
    <table>
    <tr><td>Type challenge here:</td><td><input type='text' name='adscaptcha_response_field' value='' /></td></tr>
    <tr><td>Paste code here:</td><td><input type='text' name='adscaptcha_challenge_field' value='' /></td></tr>
    </table>
</noscript>
                                

For better User Experience

For better User Experience it is recommended to reload the CAPTCHA when negative response is received from "validate"

									var reloadCaptcha = function(params) {

										jQuery.ajax({
											url: "//api.minteye.com/slider/get.ashx?callback=?",
											data: {
												captchaId : params.captchaId,
											    publicKey : params.publicKey,
											    responseType : "json"
											},
											dataType: "jsonp",
											jsonp: "callback",
											success: function (data, b) {        
												if(minteye != undefined) {
											    	minteye.render(data);
											    }    	
											},
											error: function (a, b, c) {
												//
											}
										});
		
									};
		
									// Call this function when you need to reload captcha
									reloadCaptcha({
										captchaId : "your_captcha_id",
										publicKey : "your_public_key"
									});
								
Error codes
Most likely, an error occurred when the API keys weren't set correctly.
Please check that you copied the exact key.
Make sure you didn't get confused between your public key and your private key.

Anyway, this is the full list of error codes:
CodeDescription
captchaid-not-setYou didn't set your Captcha ID. Please set it.
captchaid-invalidYour Captcha ID is invalid. Please check it again.
publickey-not-setYou didn't set your public key. Please set it.
publickey-invalidYour public key is invalid. Please check it again.
publickey-not-existsWe couldn't verify your public key. Please check it again.
publickey-not-match-captchaidYour Captcha ID and public key don't match. Please check them again.
unexpected-errorAn unexpected error occured.
We offer a variety of plugins and code examples for different programming languages and platforms.
We recommend you check out our plugins before doing it yourself.

Validate the CAPTCHA

Validate your minteye on your server-side processing by doing a POST request to our servers.
Send API request
URL: http://api.minteye.com/Validate.aspx
ParameterDescription
CaptchaIdYour Captcha ID.
PrivateKeyYour private key.
ChallengeCodeChallenge code. The value of "adscaptcha_challenge_field" (form variable).
UserResponseUser's response. The value of "adscaptcha_response_field" (form variable).
RemoteAddressUser's IP address. Used for security reasons.
Get API response
The validation response is a string: "true" for correct answer and "false" for wrong answer.
Otherwise, most likely the request parameters didn't set correctly. Please check them out.

Anyway, this is list of response strings:
Return ValueDescription
trueUser's answer was correct.
falseUser's answer was incorrect.
already-checkedCAPTCHA challenge already checked before.
captchaid-not-setYou didn't set your Captcha ID. Please set it.
captchaid-invalidYour Captcha ID is invalid. Please check it again.
privatekey-not-setYou didn't set your private key. Please set it.
privatekey-invalidYour private key is invalid. Please check it again.
challenge-not-setYou didn't send or we couldn't get the challenge code (POST field). Please set it.
challenge-invalidChallenge code (POST field) is invalid.
response-not-setYou didn't send or we couldn't get user's response (POST field). Please set it.
response-invalidUser's response (POST field) is invalid.
remoteaddress-not-setYou didn't set the remote address. Remote address is needed for security reasons. Please set it.
remoteaddress-invalidRemote address is invalid. Please check it. Required format: 0.0.0.0.
privatekey-not-existsWe couldn't verify your private key. Please check it again.
privatekey-not-match-captchaidYour Captcha ID and private key don't match. Please check them again.
unexpected-errorAn unexpected error occured.

Your API Keys

In order to add minteye to your website, you'll need to get unique API keys.
Using the API keys, we identify your website on each CAPTCHA request/validation.
Sign up now for your API keys. It's FREE!

minteye for C#/ASP.NET

minteye C#/ASP.NET class

To use minteye with C#/ASP.NET, download minteye C#/ASP.NET class, just to make things easier for you.
Extract and save AdsCaptchaAPI.cs on your website directory.

In order to use the C#/ASP.NET class, you'll need to add the class in your project/solution.

Display your CAPTCHA

Now you're ready to display your CAPTCHA.
On your form page (.aspx), place a label where the minteye will be displayed:

                                    <asp:Label ID="AdsCaptchaHolder" runat="server"></asp:Label>
                                
On the server side (.aspx.cs), set your API keys and display the CAPTCHA:
int    CaptchaId  = your captcha id;    // Set your captcha id
string PublicKey  = "your public key";  // Set your public key
AdsCaptchaHolder.Text = AdsCaptchaAPI.CAPTCHA.GetCaptcha(CaptchaId, PublicKey);
                                

Validate your CAPTCHA
On your validation process, place this code:
int    CaptchaId  = your captcha id;    // Set your captcha id
string PrivateKey = "your private key"; // Set your private key
string ChallengeCode = Request.Form["adscaptcha_challenge_field"].ToString();
string UserResponse = Request.Form["adscaptcha_response_field"].ToString();
string RemoteAddress = Request.ServerVariables["REMOTE_ADDR"];

string result = AdsCaptchaAPI.CAPTCHA.ValidateCaptcha(CaptchaId, PrivateKey, ChallengeCode, UserResponse, RemoteAddress);

if (result == "true")
{
    // Corrent answer, continue with your submission process
}
else
{
    // Wrong answer, you may display a new AdsCaptcha and add an error args 
}
                                

minteye for VB.NET

minteye VB.NET class

To use minteye with VB.NET, download minteye VB.NET class, just to make things easier for you.
Extract and save AdsCaptchaAPI.vb on your website directory.

In order to use the VB.NET class, you'll need to add the class in your project/solution.

Display your CAPTCHA

Now you're ready to display your CAPTCHA.
On your form page (.aspx), place a label where the minteye will be displayed:

<asp:Label ID="AdsCaptchaHolder" runat="server"></asp:Label>
                                
On the server side (.aspx.vb), set your API keys and display the CAPTCHA:
Dim CaptchaId As Integer = your captcha id    ' Set your captcha id
Dim PublicKey As String  = "your public key"  ' Set your public key
AdsCaptchaHolder.Text = AdsCaptchaAPI.GetCaptcha(CaptchaId, PublicKey)
                                

Validate your CAPTCHA
On your validation process, place this code:
Dim CaptchaId As Integer = your captcha id     ' Set your captcha id
Dim PrivateKey As String = "your private key"  ' Set your private key
Dim ChallengeCode As String = Request.Form("adscaptcha_challenge_field").ToString()
Dim UserResponse As String  = Request.Form("adscaptcha_response_field").ToString()
Dim RemoteAddress As String = Request.ServerVariables("REMOTE_ADDR")

Dim result As String = AdsCaptchaAPI.ValidateCaptcha(CaptchaId, PrivateKey, ChallengeCode, UserResponse, RemoteAddress)

If (result = "true") Then
    ' Corrent answer, continue with your submission process
Else
    ' Wrong answer, you may display a new AdsCaptcha and add an error args 
End If
                                

minteye for PHP

minteye PHP library

To use minteye with PHP, download minteye PHP library, just to make things easier for you.
Extract and save adscaptchalib.php on your website directory.

In order to use the PHP library, you'll need to include the library in the page/s which use it:

<?php
require_once('adscaptchalib.php');
?>
                                

Client Side - Display your CAPTCHA

Now you're ready to display your CAPTCHA.
Place this code inside your <form> where the minteye will be placed:

$captchaId  = '';   // Set your captcha id here
$publicKey  = '';   // Set your public key here
echo GetCaptcha($captchaId, $publicKey);
                                
Don't forget to set your Captcha ID and public key values.

Server Side - Validate your CAPTCHA
On your validation process, place this code:
$captchaId  = '';   // Set your captcha id here
$privateKey = '';   // Set your private key here
$challengeValue = $_POST['adscaptcha_challenge_field'];
$responseValue  = $_POST['adscaptcha_response_field'];
$remoteAddress  = $_SERVER["REMOTE_ADDR"];

if ("true" == ValidateCaptcha($captchaId, $privateKey, $challengeValue, $responseValue, $remoteAddress))
{
    // Corrent answer, continue with your submission process
} else {
    // Wrong answer, you may display a new AdsCaptcha and add an error args 
}
                                
Troubleshooting

Q: Fatal error: require_once() [function.require]: Failed opening required 'adscaptchalib.php'
A: Make sure you set the currect path to the minteye's library file.

Q: Fatal error: Call to undefined function mb_detect_encoding()
A: Make sure Multibyte String is installed and enabled in your PHP server.

minteye for JAVA

minteye JAVA library

To use minteye with Java, download minteye Java library, just to make things easier for you.
Unzip and put the adscaptcha.jar in the classpath of your web application. For example, if you are using Tomcat to run JSP, you may copy the jar file to the WEB-INF/lib/ directory.

In order to use the Java library, you'll need to import the minteye classes. In JSP, add this line in the page where the minteye will be displayed:

<@ page import="net.adscaptcha.AdsCaptchaAPI">
                                

Client Side - Display your CAPTCHA

Now you're ready to display your minteye.
Place this code inside your <form> where the minteye will be placed:

final String captchaId  = "your_captcha_id";
final String publicKey  = "your_public_key";

AdsCaptchaAPI adscaptcha = new AdsCaptchaAPI();

out.print(adscaptcha.getCaptcha(captchaId, publicKey));
                                
Don't forget to set your Captcha ID and Public Key values.

Server Side - Validate your CAPTCHA

On your validation process, place this code:

final String captchaId  = "your_captcha_id";
final String privateKey = "your_private_key";
final String challengeValue = request.getParameter("adscaptcha_challenge_field");
final String responseValue = request.getParameter("adscaptcha_response_field");		
final String remoteAddress = request.getRemoteAddr();

AdsCaptchaAPI adscaptcha = new AdsCaptchaAPI();

String result = adscaptcha.validateCaptcha(captchaId, privateKey, challengeValue, responseValue, remoteAddress);

if (result.equalsIgnoreCase("true")) 
{
	// Corrent answer, continue with your submission process
} 
else 
{
	// Wrong answer, you may display a new minteye and add an error args
}
                                
Don't forget to set your Captcha ID and Private Key values.

minteye for ASP

minteye ASP library

To use minteye with ASP, download minteye ASP library, just to make things easier for you.
Extract and save adscaptchalib.asp on your website directory.

In order to use the ASP library, you'll need to include the library in the page/s which use it:

<!-- #include virtual="/your_path/adscaptchalib.asp" -->
                                
Important: set the path according to your server path.

Client Side - Display your CAPTCHA

Now you're ready to display your CAPTCHA.
Place this code inside your <form> where the minteye will be placed:

captchaId = "your captcha id"  ' Set your captcha id
publicKey = "your public key"  ' Set your private key
Response.Write GetCaptcha(captchaId, publicKey)
                                
Don't forget to set your Captcha ID and public key values.

Server Side - Validate your CAPTCHA

On your validation process, place this code:

captchaId     = "your captcha id"   ' Set your captcha id, same value as before
privateKey    = "your private key"  ' Set your private key
challengeCode = Request("adscaptcha_challenge_field")
userResponse  = Request("adscaptcha_response_field")
remoteAddress = Request.ServerVariables("REMOTE_ADDR")
IsCaptchaValid = ValidateCaptcha(captchaId, privateKey, challengeCode, userResponse, remoteAddress)

If IsCaptchaValid = "true" Then
    ' Corrent answer, continue with your submission process
Else
    ' Wrong answer, you may display a new minteye and add an error args
End If
                                
Don't forget to set your Captcha ID and Private Key values.

minteye for WordPress

Install Plugin
  • Download our WordPress plugin.
  • If you already have an installed minteye plugin, please deactivate & delete it first.
  • On the administration panel, open Appearance > Plugins menu and click on Add New.
  • Click on the Upload tab. Use the browse button to select the plugin zip file, then click Install Now.
  • Activate the plugin.
Configure Plugin
Open Settings > minteye to configure your CAPTCHA:
  • Keys - Unique identifiers (Captcha ID, Public Key and Private Key).
    After you enter your keys, test your CAPTCHA.
  • You can choose whether to display an minteye on the registration form and/or the comments form.
  • If you want to use different CAPTCHAs on the registration form and/or the comments, you may enter a different Captcha ID.
  • You can hide the CAPTCHA for registered users (by their permission level).
  • Error argss - You can modify the error argss text according to your own language.
That's it!
The minteye is now set and displayed in your blog... Congratulations!
Requirements
  • WordPress 2.6+
  • PHP 4.3+
  • Your theme must have a <?php do_action('comment_form', $post->ID); ?> tag inside your comments.php form. Most themes do.
    If not, in your comments.php file, put <?php do_action('comment_form', $post->ID); ?> before <input name="submit"..>.
  • Multibyte String functions installed and enabled in your PHP server.
  • For multilanguage support, use UTF-8 encoding.
Troubleshooting

Q: I can't see the CAPTCHA
A: By default, the CAPTCHA is hidden for registered users (like you, as Administrator). Make sure to uncheck the "Hide CAPTCHA for registered users" or logout before checking your CAPTCHA again.

Q: The CAPTCHA displays AFTER or ABOVE the submit button on the comment form
A: You can try to check the "Rearrange CAPTCHA's position on the comment form automatically" option and javascript will attempt to rearrange it for you. If it's not fixing the problem, edit your current theme comments.php file and locate the line: <?php do_action('comment_form', $post->ID); ?>. Move this line to BEFORE the comment textarea, uncheck the rearrange option and the problem should be fixed.

Learn more about our captcha plugin for WordPress.

minteye for Joomla

Install 1.5.x Plugin
  • Download our Joomla 1.5.x plugin.
  • On the administration panel, from the Extensions menu select Install/Uninstall.
  • Under Upload Package File, click on Choose File and selected the downloaded plugin file. Than, click on Upload File & Install.
  • From the Extensions menu select Plugin Manager.
  • Click on System - minteye plugin (you can use the filter to find it quicker).
  • Enter your captcha id, public and private keys.
  • Click on Save.
  • Check System - minteye plugin and click on Enable.
Requirements for 1.5.x
  • Joomla! 1.5.x
  • PHP 4.3+
  • Multibyte String functions installed and enabled in your PHP server.
Install 2.5.x Plugin
  • Download our Joomla 2.5.x plugin.
  • On the administration panel, from the Extensions menu select Extension Manager.
  • In the Install tab, Under Upload Package File, click on Choose File and select the downloaded plugin file. Than, click on Upload & Install.
  • From the Extensions menu select Plug-in Manager.
  • Click on Captcha - AdsCaptcha plugin (you can use the filter to find it quicker).
  • Set your AdsCaptcha keys (captcha Id, public and private keys), change status to Enabled and click on Save & Close.
How to use
  • On the administration panel, from the Site menu select Global Configuration.
  • Under Default Captcha attribute, select Captcha - AdsCaptcha.
Requirements for 2.5.x
  • Joomla! 2.5.x
  • PHP 4.3+
  • Multibyte String functions installed and enabled in your PHP server.
That's it!
The minteye is now set and displayed in your Joomla website... Congratulations!

minteye for Drupal

Install Plugin
  • Download our Drupal plugin (5.x or 6.x or 7.x).
  • Upload the plugin to your Drupal server. Extract the files to your modules folder.
  • Verify that the CAPTCHA module is installed
  • On your Drupal administration page go to Site Building > Modules.
  • Under the Spam Control group, enable the CAPTCHA module and the minteye module.
Configure Plugin
  • Goto User Management > CAPTCHA > minteye tab and set your minteye keys.
  • Goto User Management > CAPTCHA. Here you can choose the forms you want to use minteye by selecting minteye as the challenge type for each form you'd like to use minteye (e.g., select minteye for comment_form to enable minteye on comments).
That's it!
The minteye is now set and displayed in your Drupal website... Congratulations!
Requirements
Troubleshooting

Q: I can't see the CAPTCHA.
A: By default, the CAPTCHA is hidden for administrators. You can change it in your CAPTCHA options.

Q: The CAPTCHA's answer is not checked.
A: The CAPTCHA ignores administrators. Please re-check it with a "simple" user.

Q: How can I check my CAPTCHA?
A: On your Drupal administration page, go to User Management > CAPTCHA and click on the Examples tab.
It should display examples of all your enabled CAPTCHAs. Check if you see the minteye example.
If an error args appears instead, please re-check your settings.

minteye for phpBB 3.x

Install Plugin
  • Download our phpBB3 plugin.
  • Unzip the adscaptcha_phpbb3.zip file, and upload the sub-directories into your root forum directory.
  • On the administration control panel (ACP), under the General tab, select Spambot countermeasures.
  • On the available plugins, select the minteye plugin, then click Configure.
  • Enter your Captcha ID, Public and Private keys.
  • Click on Submit.
That's it!
The minteye is now set and displayed in your phpBB forum... Congratulations!
Requirements
  • phpBB 3.x
  • Styles: prosilver or subsilver2
  • PHP 4.3+
  • Multibyte String functions installed and enabled in your PHP server.

minteye for vBulletin

Install Plugin
  • Download our vBulletin 4.x plugin or vBulletin 5.x plugin.
  • Unzip it and copy adscaptchalib.php and class_humanverify_adscaptcha.php to your vBulletin /includes/ directory.
  • Open your vBulletin Administrator Control Panel (ACP).
  • Open Manage Products under Plugins & Products from the navigation menu.
  • Click Add/Import Product and import product-adscaptcha.xml.
Configure Plugin
  • Open Human Verification Manager under Settings from the navigation menu.
  • Choose AdsCaptcha and save.
  • Set your AdsCaptcha keys and save.
That's it!
minteye's captcha is now set and displayed in your vBulleting registration form... Congratulations!
Requirements
  • vBulleting 4.x. or vBulleting 5.x
  • PHP 4.3+
  • For multilanguage support, use UTF-8 encoding.

minteye for Python

Install Module
  • Download our Python module.
  • Extract the archive: tar zxvf AdsCaptcha-1.0.tar.gz
  • Change directory: cd AdsCaptcha-1.0
  • Build the module: python setup.py build
  • Install the module: python setup.py install
  • Use the module: from adscaptcha import captcha | captcha.get_html(); | captcha.validate();
That's it!
The minteye is now set and displayed in your forum... Congratulations!
See README.txt for instructions and docs/example.py for sample code with usage

minteye for Perl

Install Module
  • Download our Perl module.
  • Extract the package: tar zxvf Captcha-adsCAPTCHA-1.0.tar.gz
  • Change directory: cd Captcha-adsCAPTCHA-1.0
  • Run the Makefile.PL: perl Makefile.PL
  • Build the package: make
  • Test the package: make test
  • Install the package: make install
  • See the man page for package use information: man Captcha::adsCAPTCHA
That's it!
The minteye is now set and displayed in your forum... Congratulations!
An example CGI script using this module can be found in the examples folder: Captcha-adsCAPTCHA-1.0/examples/captcha.pl

minteye for Ruby

Install package
  • Download our Ruby package.
  • Extract the package: tar zxvf adscaptcha-0.0.1.tar.gz
  • Change directory: cd adscaptcha-0.0.1
  • Build the gem module: gem build gem build adscaptcha.gemspec
  • Install the gem: gem install adscaptcha-0.0.1.gem
Test the package
  • Download our Ruby sample.
  • Extract the sample: tar zxvf sample.tar.gz
  • Change directory: cd sample
  • Start the rails server: ./script/server
  • Take a browser and go to: http://localhost:3000
That's it!
The minteye is now set and displayed in your forum... Congratulations!
Requirements
  • ruby 1.8 and rails

minteye for DotNetNuke

Coming soon...