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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
> 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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |