How to make the randomly generated text as an image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nert
    New Member
    • Nov 2006
    • 64

    How to make the randomly generated text as an image

    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,99999 99);
    $pword = substr(md5($ran d_pword), 0, 5);
    return $pword;
    }[/PHP]

    thanks..,


    --nert (^_^)
    Last edited by Nert; Feb 21 '07, 03:18 AM. Reason: a bit error in the function
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    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.

    Comment

    • Nert
      New Member
      • Nov 2006
      • 64

      #3
      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 (^_^)

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        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

        Comment

        Working...