Post by Heilong » Wed Nov 19, 2008 10:19 am

Hi everyone,

I want to know how to add a captcha for user registration process, is there a contribution that make it or an option from the admin panel that I didn't find ?

Thanks for your help,

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by Qphoria » Wed Nov 19, 2008 10:23 am

There is no default option in the admin panel

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Heilong » Wed Nov 19, 2008 10:35 am

I'd like to know also how to add it on the registration page.

Thanks,

New member

Posts

Joined
Mon Sep 01, 2008 5:57 pm

Post by bruce » Wed Nov 19, 2008 11:18 am

I have not got this yet either. Try a google search for php captcha. There are plenty of free offerings as well as discussions about the pros and cons of this mechanism.

If you decide to implement it, you will not have much difficulty.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by JNeuhoff » Wed Nov 19, 2008 6:20 pm

You can use the capcha from http://www.phpcaptcha.org. Documentation at http://www.phpcaptcha.org/Securimage_Docs/ .

I use it myself for user reviews at ClickShopGuide. It's opensource and fully written in PHP, and can be easily integrated into OpenCart.

In your tpl file, add this code for the image (assuming the 'securimage' runtime directory is installed in your main OpenCart directory):

Code: Select all

.....
<img src="<?php echo 'securimage/securimage_show.php?sid='.md5(uniqid(time())); ?>" alt="" />
.....
<input type="text" name="code" size="4" maxlength="4" />
.....
When you validate the submitted form, do the following:

Code: Select all

		.....
		$img = new Securimage();
		$code = (isset($_POST['code'])) ? $_POST['code'] : '';
		$valid = $img->check( $code );
		if (!$valid) {
			// there is an error, wrong capcha code submitted
		}
		....
Last edited by JNeuhoff on Wed Nov 19, 2008 6:31 pm, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by hm2k » Wed Nov 19, 2008 6:38 pm

recaptcha seems to be getting more and more popular: http://recaptcha.net/

However, I do find that captcha's are sometimes over kill.

More often that not, all you need is a carefully written question that all humans can read and answer, but won't be obvious to a bot.

Doing this is so much more user friendly than making people type god awful words in, and sometimes getting it wrong. The last thing you want to do is deter customers from ordering on your site.

This is how php.net does it for their comments section, but using math questions.

Best of all, if the bots do eventually catch on to the answer to your question, all you have to do is change the question and answer, you can even rotate them. Easy.

This is something I may look into adding into 0.8, although i've not seen any spambot issues, I am aware of the potential risk.

Good luck!

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Wed Nov 19, 2008 10:43 pm

Yes a simple captcha image with readable characters is fine.. but Ive seen some sites ask you to find which letters look like cats... and they all look like cats of some sort

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Wed Nov 19, 2008 11:04 pm

Yeah that's rapidshare (http://depressedprogrammer.wordpress.co ... tcha-ever/)

On a ticket system I created I used the system font to display an image that contained 5 numbers which the user had to enter into a security field. This never failed me.

On a phpBB forum site, in addition to the regular captcha, because the bots learned to go round the captcha, I added a simple plain text question, which requires a plain text answer. While the captcha might as well not even be there.

You can see what php.net do here -> http://uk3.php.net/manual/add-note.php? ... hpinfo.php

I don't think captcha is even needed, a plain text question/answer that is adjustable in the settings will suffice. (something for 0.8)

If not I'd recommend implementing recaptcha on a case by case basis.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by joegolike » Thu Nov 20, 2008 2:10 am

I've got reCaptcha working on one of my non-OpenCart sites. Their PHP instructions are pretty straightforward.

http://recaptcha.net/

My only beef with them is their code doesn't validate xhtml strict.

New member

Posts

Joined
Fri May 23, 2008 3:42 pm
Who is online

Users browsing this forum: No registered users and 4 guests