473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to create anti spam Image

254 100+
Hello I want to create Antispam Image using PHP and GD Library how can I do it.
Feb 8 '08 #1
10 2590
MarkoKlacar
296 Expert 100+
Well, you probably have about a million ways to do it. I would probably generate a random string (mixed with chars and ints) and draw some random lines to make it harder to read. What you also can do is rotate or combine different colours.

Hope this helps.
Feb 8 '08 #2
nathj
938 Expert 512MB
Hi,

Take a look at this offering

I've used this myself a number of times and it's pretty good.

nathj
Feb 8 '08 #3
Markus
6,050 Expert 4TB
Well, you probably have about a million ways to do it. I would probably generate a random string (mixed with chars and ints) and draw some random lines to make it harder to read. What you also can do is rotate or combine different colours.

Hope this helps.
Personally i hate it when people put lines through it.. absolutely hate it.

I mean, if only a person is going to be able to read it, what good does a disfiguring line do? ABSOLUTELY NOTHING. Except anger me

>=[

[/RANT]

:)
Feb 8 '08 #4
nathj
938 Expert 512MB
Personally i hate it when people put lines through it.. absolutely hate it.

I mean, if only a person is going to be able to read it, what good does a disfiguring line do? ABSOLUTELY NOTHING. Except anger me

>=[

[/RANT]

:)
Hey there,

I agree to be hoset and I avoid using captchas except when my boss insist on them - so far only once.

There are better ways to handle form abuse than forcing the user to squint.

nathj
Feb 8 '08 #5
Markus
6,050 Expert 4TB
Hey there,

I agree to be hoset and I avoid using captchas except when my boss insist on them - so far only once.

There are better ways to handle form abuse than forcing the user to squint.

nathj
Yeh, exactly.
I like MySpace's use of them (don't ever quote me as saying i like myspace) - they use them very rarely but often enough to prevent spam; but then again, they do it in some stupid font and a stupid amount of chars, which makes no sense to me - If a computer can't read it, why should it be made difficult for a human to read?

Gah!

Hate captchas, me do.
Feb 8 '08 #6
helraizer1
118 100+
The over all best way is to make a bigger image, with bigger letters (easy to see for a human), have two codes (the human can see which one if you ask, the bot will have to guess).

Make the text stand out (again easy to see), but break down the string with str_split, then make the code with a random number generator, depending on a number, ask the user to input those characters, on the different image. If you have every combination of 5 digit codes between 00000 and 99999 the human can easily recognise it and enter the code but a bot will have a 1 in around 3'075 chance of getting it each time. =P that's only using numbers, if you use letters too that figure will easily be in five figures. Thus not much chance.

Finally, since the characters of the code are individual in array (thanks to string split) but then on the image, place them easy to see but have some at different angles thus the lines of the characters touch and overlap. This ought to confuse OCR programs, since they map out the characters by the lines, if the lines overlap, it'll be harder to do, for it to recognise them but easy for a human to see.

An example of the two codes on one image


there is distortion in the background but the characters stand out. and the user is asked for 5 of the six characters, from either code seen.

An example of standing out text with overlapping (to an extent).



Sam
Feb 8 '08 #7
I do not like captchas anyways but there can be a good way to have a dynamically moving (animated) background generated on the fly with some random text in front.

But as Gurus here already said (and I agree) there are better ways other than captchas. Captchas just irritate people.
Feb 8 '08 #8
Markus
6,050 Expert 4TB
The over all best way is to make a bigger image, with bigger letters (easy to see for a human), have two codes (the human can see which one if you ask, the bot will have to guess).

Make the text stand out (again easy to see), but break down the string with str_split, then make the code with a random number generator, depending on a number, ask the user to input those characters, on the different image. If you have every combination of 5 digit codes between 00000 and 99999 the human can easily recognise it and enter the code but a bot will have a 1 in around 3'075 chance of getting it each time. =P that's only using numbers, if you use letters too that figure will easily be in five figures. Thus not much chance.

Finally, since the characters of the code are individual in array (thanks to string split) but then on the image, place them easy to see but have some at different angles thus the lines of the characters touch and overlap. This ought to confuse OCR programs, since they map out the characters by the lines, if the lines overlap, it'll be harder to do, for it to recognise them but easy for a human to see.

An example of the two codes on one image


there is distortion in the background but the characters stand out. and the user is asked for 5 of the six characters, from either code seen.

An example of standing out text with overlapping (to an extent).



Sam
Why would anyone want to do that? I mean, sure it looks 'professional' n all.. but it's just annoying and unnecessary.

A simple image of 4 clear letters and you're done. Hay-presto.
Feb 8 '08 #9
helraizer1
118 100+
Why would anyone want to do that? I mean, sure it looks 'professional' n all.. but it's just annoying and unnecessary.

A simple image of 4 clear letters and you're done. Hay-presto.
Well no, if you need a captcha for registration, to stop spam users, and use a plain background with just for monospaced, regular characters; if they want in they will use a simple OCR (Optical Character Recognition) program and will get it. That's why the more obscure ones that mask the characters slightly that a human can easily read can make it harder for the bot, therefore you won't get any spam users.

Again, if you ask for all 4 characters each time, if the attacker works out how your codes work and their program can read it each time. It'll never stop them. However if you ask for 5characters in any order or even 6 characters from 2 codes a-z 0-9. The bot may be able to read the characters but it then has a 1 in over 10,000 chance of getting it.

Sam
Feb 9 '08 #10
helraizer1
118 100+
Well no, if you need a captcha for registration, to stop spam users, and use a plain background with just for monospaced, regular characters; if they want in they will use a simple OCR (Optical Character Recognition) program and will get it. That's why the more obscure ones that mask the characters slightly that a human can easily read can make it harder for the bot, therefore you won't get any spam users.

Again, if you ask for all 4 characters each time, if the attacker works out how your codes work and their program can read it each time. It'll never stop them. However if you ask for 5characters in any order or even 6 characters from 2 codes a-z 0-9. The bot may be able to read the characters but it then has a 1 in over 10,000 chance of getting it.

Sam
Just realised I wasn't quite right with the a-z 1-9 thing but there is a 1 in 3'075 chance for the bot to guess the code.
Feb 10 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: John Smith | last post by:
Hi, I've been trying to play around with a simple script to stop people stealing images (and bandwidth) but without much success : strFolder="imageshidden" strServer =...
7
by: Maxim Shemanarev | last post by:
I'd like to announce my project called Anti-Grain Geometry. http://www.antigrain.com Anti-Grain Geometry (AGG) is an Open Source, free of charge graphic library, written in industrially standard...
3
by: Michel | last post by:
Is there a way I can anti-aliasing a gif to be able to get a hi-quality resizeable backgroundpicture. When a GIF of JPG is being resized by the browser you get wurse pictures because it needs a...
6
by: Alan Kennedy | last post by:
Hi All, If there any contributors of SpamBayes reading, Congratulations! SpamBayes has won the Personal Computer World (pcw.co.uk) Editors Choice award for anti-spam software, in a review of...
6
by: WindAndWaves | last post by:
Hi guys Thank you for all your previous answers. My new question is as follows: how do I create a folder/file browser in access 2003. That is, I would like the user to locate several files...
2
by: Mark R. Dawson | last post by:
Hi all, I have a directory full of images (most over 2MB in size) I was to show each image as a thumbnail on a form, however in order to create a thumbnail I have to open the complete image then...
1
by: pete | last post by:
Hi, I have an application making a callout to McAfee anti-spam filter third-party library via Java JNI. The problem experienced is that after some amount of email is passed into the library it...
4
by: Mike | last post by:
Hi, I took an interest a few months ago in an anti framebreaker javascript. All my research told me that it was impossible. If a website is loaded into a frame/iframe then if it has frame...
11
by: blickensdoerfer | last post by:
i have a problem using ImageTTFText: I want a Text in Arial , 8pt, without Anti-Aliasing . The result is very ugly, how can i get it proper like it would be displayed in the browser window or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.