Script to stop robot submissions?

This is a discussion on Script to stop robot submissions? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi, Can anyone point me in the direction of a script that will stop robots from making multiple submissions to ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-27-2005
Warmbells
 
Posts: n/a
Default Script to stop robot submissions?

Hi,

Can anyone point me in the direction of a script that will stop robots
from making multiple submissions to forms that we have on our site (20
to 30 in less than a minute), I was thinking of something like the ones
I have seen where yor have to enter a series of characters that are
displayed as a graphic. I have done a search but not found anything
(probably asking the wrong questions).

Thanks

Gerald
Reply With Quote
  #2 (permalink)  
Old 03-27-2005
RotterdamStudents
 
Posts: n/a
Default Re: Script to stop robot submissions?

> Hi,
>
> Can anyone point me in the direction of a script that will stop robots
> from making multiple submissions to forms that we have on our site (20 to
> 30 in less than a minute), I was thinking of something like the ones I
> have seen where yor have to enter a series of characters that are
> displayed as a graphic. I have done a search but not found anything
> (probably asking the wrong questions).
>

To make the pic with the random character you can use the script below

<?php
$random = rand(100000, 999999);

header("Content-type: image/png");
$im = @imagecreate(500, 25)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 250, 250, 250);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 5, 5, 5, "$random", $text_color);
imagegif($im);
imagedestroy($im);
?>

The $random value you can also store in your mysql database to verify the
form.

Martijn


Reply With Quote
  #3 (permalink)  
Old 03-27-2005
Andy Hassall
 
Posts: n/a
Default Re: Script to stop robot submissions?

On Sun, 27 Mar 2005 17:14:47 +0200, "RotterdamStudents"
<NOSPAMnewsNOSPAM@MAPSONcistron.nederland> wrote:

>> Can anyone point me in the direction of a script that will stop robots
>> from making multiple submissions to forms that we have on our site (20 to
>> 30 in less than a minute), I was thinking of something like the ones I
>> have seen where yor have to enter a series of characters that are
>> displayed as a graphic. I have done a search but not found anything
>> (probably asking the wrong questions).
>>

>To make the pic with the random character you can use the script below
>
><?php
>$random = rand(100000, 999999);
>
>header("Content-type: image/png");
>$im = @imagecreate(500, 25)
> or die("Cannot Initialize new GD image stream");
>$background_color = imagecolorallocate($im, 250, 250, 250);
>$text_color = imagecolorallocate($im, 233, 14, 91);
>imagestring($im, 5, 5, 5, "$random", $text_color);
>imagegif($im);
>imagedestroy($im);
>?>
>
>The $random value you can also store in your mysql database to verify the
>form.


That would stop casual downloads, but wouldn't stop a determined bot author
since it's using an easily recognisable and consistent font.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
  #4 (permalink)  
Old 04-05-2005
Hello
 
Posts: n/a
Default Re: Script to stop robot submissions?

You can have the letters large and different color. Then put a grey mesh of
thin lines over. You can stretch the picture x or y axis easly with PHP too
changing the letter thikness. Also you can use several fonts together.

Perhaps you'd like to hire me, I could do it in two days.


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:oumd415gqkfgi3qvj2tn4tudetu69ejj5l@4ax.com...
> On Sun, 27 Mar 2005 17:14:47 +0200, "RotterdamStudents"
> <NOSPAMnewsNOSPAM@MAPSONcistron.nederland> wrote:
>
>>> Can anyone point me in the direction of a script that will stop robots
>>> from making multiple submissions to forms that we have on our site (20
>>> to
>>> 30 in less than a minute), I was thinking of something like the ones I
>>> have seen where yor have to enter a series of characters that are
>>> displayed as a graphic. I have done a search but not found anything
>>> (probably asking the wrong questions).
>>>

>>To make the pic with the random character you can use the script below
>>
>><?php
>>$random = rand(100000, 999999);
>>
>>header("Content-type: image/png");
>>$im = @imagecreate(500, 25)
>> or die("Cannot Initialize new GD image stream");
>>$background_color = imagecolorallocate($im, 250, 250, 250);
>>$text_color = imagecolorallocate($im, 233, 14, 91);
>>imagestring($im, 5, 5, 5, "$random", $text_color);
>>imagegif($im);
>>imagedestroy($im);
>>?>
>>
>>The $random value you can also store in your mysql database to verify the
>>form.

>
> That would stop casual downloads, but wouldn't stop a determined bot
> author
> since it's using an easily recognisable and consistent font.
>
> --
> Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool



Reply With Quote
  #5 (permalink)  
Old 04-05-2005
Andy Hassall
 
Posts: n/a
Default Re: Script to stop robot submissions?

On Tue, 05 Apr 2005 03:36:43 GMT, "Hello" <no-emai@sorry.com> wrote:

>> That would stop casual downloads, but wouldn't stop a determined bot
>> author
>> since it's using an easily recognisable and consistent font.

>
>You can have the letters large and different color. Then put a grey mesh of
>thin lines over. You can stretch the picture x or y axis easly with PHP too
>changing the letter thikness. Also you can use several fonts together.


Yes, that's the point. This is called a "CAPTCHA".

>Perhaps you'd like to hire me, I could do it in two days.


Or to save time and money and use one of the many free bits of code already
available. e.g. http://pear.php.net/package/Text_CAPTCHA#results

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0