Jump to content
Sign in to follow this  
Druide

NEW: Anti Robot Registration Validation

Recommended Posts

Length of Validation Code. 5

Width of validation image 260

Height of validation image 50

Horizontal spacing between code characters 5

Vertical character spacing for validation image 5

Share this post


Link to post
Share on other sites

The positioning will vary with different fonts, I use 5 as patrick has detailed

 

I quite like the way the characters are sometimes just off, its rare that its difficult to distinguish.

 

The character set is done in the function in account_validation.php

 

find:

 

$chars = array('a','b','c','d','e','f','g','h','j','k','l','m','n','p','q','r','s','t','u','v','w','x','y','z', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' @ ', '#', '?', '+', '=');

and set as you wish

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

If you wish to increase the vertical space to reduce overlap

 

in validation_png.php

 

find

 

 

$max_code_height = max($max_code_height, max($char_bbox[1],$char_bbox[3]) - max($char_bbox[5], $char_bbox[7]));

replace with

 

 

$max_code_height = max($max_code_height, max($char_bbox[1],$char_bbox[3],$char_bbox[5],$char_bbox[7]) -  min($char_bbox[1],$char_bbox[3],$char_bbox[5],$char_bbox[7]));

 

The font angle & size also effects things (ttf only).


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Thanks for your help spooks.The new version of contact_us.php worked for me!!!!

Edited by mkam

Share this post


Link to post
Share on other sites

Thanks very much. I now have it displaying the characters in such a way that you can read them even though sometimes they are slightly off the screen.

 

How difficult would it be to add a button that allows the user to select a different image without having to click refresh. That way if for some strange reason, they can't distinguish a letter, they can reload the page.

Share this post


Link to post
Share on other sites
Thanks very much. I now have it displaying the characters in such a way that you can read them even though sometimes they are slightly off the screen.

 

How difficult would it be to add a button that allows the user to select a different image without having to click refresh. That way if for some strange reason, they can't distinguish a letter, they can reload the page.

 

 

You could add a page refresh button, but you would maybe want to add to the page functionality if you wish to avoid the user loosing any form content already filled in.

 

It needs to be a full refresh as a new code has to be generated & stored.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Ok, I didn't look too much into the code. I thought that it might be possible with a javascript routine to make the necessary calls to change the data without having to do a full refresh.

 

I guess it will have to stay the way it is. With the new font that I am using it is now very rare that a letter is not visible.

Share this post


Link to post
Share on other sites

Well you could do this:

 

Find:

 

$validation_images = tep_image_captcha('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] .'&csh='.uniqid(0)');

Replace with:

 

$validation_images = tep_image_captcha('validation_png.php?rsid=' . $new_guery_anti_robotreg['session_id'] .'&csh='.uniqid(0), 'name="Campcha"');

 

Find:

 

<td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span></td>

 

Replace with:

 

<td class="main" width="100%" NOWRAP><span class="main"> <?php echo ENTRY_ANTIROBOTREG; ?></span><br /><br /><script type="text/javascript">
  blank_image = new Image();
  blank_image.src = "images/pixel_trans.gif";
  valid_image = new Image();
  valid_image.src = "validation_png.php?rsid=<?php echo $new_guery_anti_robotreg['session_id'] . '&csh='.uniqid(0);?>"; 
  document.writeln('<a onMouseDown="Campcha.src=blank_image.src;"onMouseUp="Campcha.src=valid_image.src; Reload.src=blank_image.src;">') 
  document.writeln('<img src="images/reload.gif" name="Reload" align="right" alt="Reload Validator" border="0"><\/a>')
   </script> </td>

 

That will allow a once off re-arrangement of the code.

You'll need to make the button images/reload.gif

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

The robots are coming!

 

Ive updated the contact us.php

yet it still gives me an invalid registration code

however people are signing up to the site through new users ok

i had 'contact us' turned off but have had the first robot contact today.

 

I live in fear

they know where i live

Share this post


Link to post
Share on other sites

I would suggest you try adding a ttf font, I can't see why it should fail for contact us unless you have errors on your site, it works fine for others.

 

I have a major update I will be releasing v soon, new filters, re-organized & recoded.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

hello,

 

love your application. unfortunately i get this error:

 

generation error: missing SID please refresh browser

 

and the validation code doesn´t appear.

 

can anybody help me out, please?

Share this post


Link to post
Share on other sites
hello,

 

love your application. unfortunately i get this error:

 

generation error: missing SID please refresh browser

 

and the validation code doesn´t appear.

 

can anybody help me out, please?

 

 

this is the error i get trying to upload version antirobot registration 2.8 english

 

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('736', 'Anti Robot Reg', 'Anti Robot Registration', 300, 1);# Affected rows: 1

 

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Activate the Anti Robot Registration?', 'ACCOUNT_VALIDATION', 'true', 'This forces the user to enter a visual code, preventing bots from automatically registering.', 736, 10, '2004-08-08 17:00:00', '2004-08-08 17:00:00', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');# Affected rows: 1

 

 

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added,[...]

 

my antirobot datafile doesn´t look like it should (i think) but i don´t know how to fix it.

 

everythink works great, but the code doesn´t appear, instead a red square with the error.

 

can anybody please lend me hand?

 

i have metatags SEO and customer testimonials also installed.

 

thanks in advance.

Share this post


Link to post
Share on other sites

There are errors on your site causing loss of sid, sid is an essential part of Anti Robot Registration Validation and it will not work without it.

 

SEO can cause loss of $_GET that may be the trouble, try turning off the SEO to check.

 

Failure to use tep_href_link for all links will also cause loss of sid.

 

Do you have a url?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
There are errors on your site causing loss of sid, sid is an essential part of Anti Robot Registration Validation and it will not work without it.

 

SEO can cause loss of $_GET that may be the trouble, try turning off the SEO to check.

 

Failure to use tep_href_link for all links will also cause loss of sid.

 

Do you have a url?

 

thanks for your advice. i have my website installed on localhost. i uploaded to my host to post it here and let you know, but i realized that in my host in working perfectly.

 

thank you very much anyway.

 

my localhost is in windows and my server is working on linux. i also had problems with other contributions, that get solved as soon as i uploaded my site. seems somethings wrong with windows server lol!

 

i love u guys!

Share this post


Link to post
Share on other sites

Others appear to have had this too, perhaps windows has trouble with sid, clearly as long as it works on a 'real' server there is no issue.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

There is typo in validation_png.php line 89

 

$height = ($image_hieght > $max_code_height + $top_margin) ? $image_hieght : $max_code_height + $top_margin;

 

it shuold read

 

$height = ($image_height > $max_code_height + $top_margin) ? $image_height : $max_code_height + $top_margin;

Edited by snowbird

---------------------------------------------

Regards,

 

Snowbird

Share this post


Link to post
Share on other sites
There is typo in validation_png.php line 89

 

$height = ($image_hieght > $max_code_height + $top_margin) ? $image_hieght : $max_code_height + $top_margin;

 

it shuold read

 

$height = ($image_height > $max_code_height + $top_margin) ? $image_height : $max_code_height + $top_margin;

 

Thanks for that, thougth if you change that you also need to change line 69 from:

 

$image_hieght = (ANTI_ROBOT_IMAGE_HEIGHT != 0 ? ANTI_ROBOT_IMAGE_HEIGHT : 50);

 

to:

$image_height = (ANTI_ROBOT_IMAGE_HEIGHT != 0 ? ANTI_ROBOT_IMAGE_HEIGHT : 50);

 

Dyslexia Lures KO!!


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Has anyone had any joy with resolving the contact_us problems? I've got version 2.9 installed and keep getting an invalid registration code message.

 

I've tried it with the contact_us page that comes with v2.9 and still get the same problem. The database table appears to be generating the code as it should do, but this invalid message still appears.

 

Any help or comments would be appreciated

Share this post


Link to post
Share on other sites
Has anyone had any joy with resolving the contact_us problems? I've got version 2.9 installed and keep getting an invalid registration code message.

 

I've tried it with the contact_us page that comes with v2.9 and still get the same problem. The database table appears to be generating the code as it should do, but this invalid message still appears.

 

Any help or comments would be appreciated

 

Hell, have you tried I worte earlier?

http://forums.oscommerce.com/index.php?sho...p;#entry1255681

Share this post


Link to post
Share on other sites

Hi,

 

Has anyone done anything for the testimonial version 3.6. The testimonial submission is not anti robot registration validated.

 

I have been trying to DIY but it doesnt happen as my php sucks!!

 

<_<

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×