SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    exit();
    Join Date
    Jul 2000
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am trying to create a random password script in PHP...I know there should be something like:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    $random = "dsfajlfd23424sf";
    [/code]

    Then "dsfajlfd23424sf" would come out to something like: 2352dsf or something like that That is all I know so far.

    Could someone please help me out? Thanks!

    ------------------
    ICQ Me! (73902680)

  2. #2
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On my site I create random passwords like this:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>// create a random 32 characters long string
    $random = md5 (uniqid (rand ()));
    // take a 8 characters long substring as a password
    $password = substr ($random, 0, 8);[/code]



    ------------------
    Antti
    Huotari.com/antti/
    LinuxWebDevNews.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •