473,394 Members | 1,893 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,394 software developers and data experts.

Producing a graphic from Text

Hi,

I am just about to write a registration screen for a web based application.
I have seen and used registration screens that show the user a graphic
containing randon text that they are asked to type in a box below the
graphic. I believe this is to stop automaton's automatically creating
multiple accounts without any human interaction.

From memory I think this method is used when registering for a hotmail
account.

Does anybody know how I can do this, i.e. Produce a graphic from randomly
generated text, in .Net?, and in particular is there any .net code out there
(VB.Net ideally), or component that does this job?
Thanks, Mike.
Jun 23 '06 #1
4 1304
V
I don't know if this is what you are looking for, but I would use
either of the two approaches below:

1. Use GDI+ classes, to draw a bitmap based on a text, and then show it
at the runtime.

2. Better yet, I would simply create a small database of images and
store them with their texts, and rotate them randomly for the website.

But if there are libraries or controls which server specifically this
purpose, I am not aware of that.

- Vaibhav

Mike Owen wrote:
Hi,

I am just about to write a registration screen for a web based application.
I have seen and used registration screens that show the user a graphic
containing randon text that they are asked to type in a box below the
graphic. I believe this is to stop automaton's automatically creating
multiple accounts without any human interaction.

From memory I think this method is used when registering for a hotmail
account.

Does anybody know how I can do this, i.e. Produce a graphic from randomly
generated text, in .Net?, and in particular is there any .net code out there
(VB.Net ideally), or component that does this job?
Thanks, Mike.


Jun 23 '06 #2
Thanks Vaibhav.

The 'small database of images' sounds like a good idea, and it would
probably be good enough.

I wonder if anybody else knows if this is how sites like msn do it, or is
there some cunning code out there that already does the job?
Cheers, Mike.

"V" wrote:
I don't know if this is what you are looking for, but I would use
either of the two approaches below:

1. Use GDI+ classes, to draw a bitmap based on a text, and then show it
at the runtime.

2. Better yet, I would simply create a small database of images and
store them with their texts, and rotate them randomly for the website.

But if there are libraries or controls which server specifically this
purpose, I am not aware of that.

- Vaibhav

Mike Owen wrote:
Hi,

I am just about to write a registration screen for a web based application.
I have seen and used registration screens that show the user a graphic
containing randon text that they are asked to type in a box below the
graphic. I believe this is to stop automaton's automatically creating
multiple accounts without any human interaction.

From memory I think this method is used when registering for a hotmail
account.

Does anybody know how I can do this, i.e. Produce a graphic from randomly
generated text, in .Net?, and in particular is there any .net code out there
(VB.Net ideally), or component that does this job?
Thanks, Mike.


Jun 23 '06 #3
Hello Mike,

The term you are looking for is CAPCHA (what a horrid name).. anyhow, look
it up on google.

-Boo
Thanks Vaibhav.

The 'small database of images' sounds like a good idea, and it would
probably be good enough.

I wonder if anybody else knows if this is how sites like msn do it, or
is there some cunning code out there that already does the job?

Cheers, Mike.

"V" wrote:
I don't know if this is what you are looking for, but I would use
either of the two approaches below:

1. Use GDI+ classes, to draw a bitmap based on a text, and then show
it at the runtime.

2. Better yet, I would simply create a small database of images and
store them with their texts, and rotate them randomly for the
website.

But if there are libraries or controls which server specifically this
purpose, I am not aware of that.

- Vaibhav

Mike Owen wrote:
Hi,

I am just about to write a registration screen for a web based
application. I have seen and used registration screens that show the
user a graphic containing randon text that they are asked to type in
a box below the graphic. I believe this is to stop automaton's
automatically creating multiple accounts without any human
interaction.

From memory I think this method is used when registering for a
hotmail account.

Does anybody know how I can do this, i.e. Produce a graphic from
randomly generated text, in .Net?, and in particular is there any
.net code out there (VB.Net ideally), or component that does this
job?

Thanks, Mike.

Jun 23 '06 #4
Hi Mike,

Thanks for your post!

The small database images solution is not perfect to achieve the really
random image. While the GDI+ dynamically generated image is more flexible
and it is very simple to implement. You just need to use
Graphics.DrawString method to write out the string to a Graphics object,
and then save it to the Response.OutputStream for displaying.

The article below shows you the full code snippet regarding doing this:
"How to Create Text Image on the fly with ASP.NET"
http://www.codeproject.com/aspnet/createTextImage.asp

The 2 articles below demonstrate more the power of GDI+ for dynamic image
generating:
"Create Snazzy Web Charts and Graphics On the Fly with the .NET Framework"
http://msdn.microsoft.com/msdnmag/is...w/default.aspx
"ASP.NET Controls to prevent automatic registrations from bots"
http://www.codeproject.com/aspnet/antiauto.asp

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: entoone | last post by:
print "\t\t<td><bgcolor=#000000><font color=#000000 font color=#000000 face=Tahoma size=2 ><A href='show.php?searchid=$line'>More Info</td>\n"; How would I subsittue text for a graphic in php,...
20
by: Joe exCSSive | last post by:
Hi, folks: I'm back...and now I'm really stuck !! I have a graphic ( http://www.sundialontario.com/images/makeitatable.jpg ) that I would like to convert to CSS and I'm not sure how to do...
1
by: Lopezd9 | last post by:
My understanding is that GRAPHIC and VARGRAPHIC data types can store text encoded in UCS-2 in a Unicode database (ie when it is created so that CHAR is encoded in UTF-8). What is the encoding of...
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
13
by: Stacey Levine | last post by:
Ok.. Maybe I am trying the wrong approach. If given a URL to a graphic, I want to save that graphic to a local file. The approach below gets the response, but I can't quite figure out how to save...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
9
by: Bosconian | last post by:
I'm looking for a method to plot graphic lines and text for a bracket-like display with multiple tiers in a browser. I'm familiar with GD for outputting dynamic graphics, but have never utilized...
2
by: Larry Bud | last post by:
Ok, I don't know what they're called, but you know the form: The page displays a "code", usually on a similar color background (dark gray), and the text is all squiggly. It's an attempt to foil...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.