Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NEW: Anti Robot Registration Validation


Druide

Recommended Posts

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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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!

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
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://www.oscommerce.com/forums/index.php?sho...p;#entry1255681

Link to comment
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!!

 

<_<

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...