Connecting Tech Pros Worldwide Forums | Help | Site Map

How to make the randomly generated text as an image

Nert's Avatar
Member
 
Join Date: Nov 2006
Location: Philippines
Posts: 64
#1: Feb 21 '07
hi everyone,

Could anyone please teach me how to make the randomly generated text as an image? same as the image we have seen when we were signing up in this forum (www.thescripts.com). this is my code when i generate the random text.

[PHP]function random_password(){
$rand_pword = mt_rand(0,9999999);
$pword = substr(md5($rand_pword), 0, 5);
return $pword;
}[/PHP]

thanks..,


--nert (^_^)

Motoma's Avatar
Moderator
 
Join Date: Jan 2007
Location: Maine, USA
Posts: 2,904
#2: Feb 21 '07

re: How to make the randomly generated text as an image


Take a look at the GD library. It can be used to draw images, write text onto images, and paste images together. I think this will provide you will all of the tools you need to accomplish this task.
Nert's Avatar
Member
 
Join Date: Nov 2006
Location: Philippines
Posts: 64
#3: Feb 27 '07

re: How to make the randomly generated text as an image


Quote:

Originally Posted by Motoma

Take a look at the GD library. It can be used to draw images, write text onto images, and paste images together. I think this will provide you will all of the tools you need to accomplish this task.

Yah, thanks i made it now with the help of GD library.


--nert (^_^)
Motoma's Avatar
Moderator
 
Join Date: Jan 2007
Location: Maine, USA
Posts: 2,904
#4: Feb 27 '07

re: How to make the randomly generated text as an image


Quote:

Originally Posted by Nert

Yah, thanks i made it now with the help of GD library.


--nert (^_^)

Yay!
If it's not too much code (and of course, you don't mind), you could post it here for mad props!
:D
Reply