473,231 Members | 1,634 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,231 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 1300
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.