4 replies
Where can I get an ASP random password to send to people that sign up for my ecourse via email?

I need a random password that will be automatically sent to people via email and that will be no longer available once it has been activated. Can someone please tell me where I can get something like this?

Thanks
#password #script
  • Profile picture of the author newmoon
    Function generatePassword( allowNumbers )
    NUMLOWER = 48 ' 48 = 0
    NUMUPPER = 57 ' 57 = 9
    LOWERBOUND = 65 ' 65 = A
    UPPERBOUND = 90 ' 90 = Z
    LOWERBOUND1 = 97 ' 97 = a
    UPPERBOUND1 = 122 ' 122 = z
    PASSWORD_LENGTH = 6

    ' initialize the random number generator
    Randomize()

    newPassword = ""
    count = 0
    DO UNTIL count = PASSWORD_LENGTH
    If allowNumbers Then
    pwd = Int( ( NUMUPPER - NUMLOWER ) * Rnd + NUMLOWER )
    Else
    ' generate a num between 2 and 10 ;
    ' if num > 4 create an uppercase else create lowercase
    If Int( ( 10 - 2 + 1 ) * Rnd + 2 ) > 4 Then
    pwd = Int( ( UPPERBOUND - LOWERBOUND + 1 ) * Rnd + LOWERBOUND )
    Else
    pwd = Int( ( UPPERBOUND1 - LOWERBOUND1 + 1 ) * Rnd + LOWERBOUND1 )
    End If
    End If

    newPassword = newPassword + Chr( pwd )

    count = count + 1
    Loop

    generatePassword = newPassword
    End Function
    now call it like:
    Generated with generatePassword(True): 850114
    841824
    717465
    Generated with generatePassword(False): CDYmSL
    uGChYD
    dvEOFU
    source: I can't post link
    {{ DiscussionBoard.errors[2155543].message }}
  • Profile picture of the author newmoon
    Hello,
    You sent me an PM. I am tiny person here. I don't have privilege to reply.

    I the thread I guess you said in ASP. ASP code won't work in the WordPress as WordPress is built using PHP.
    {{ DiscussionBoard.errors[2155854].message }}
    • Profile picture of the author mobiusman
      Is this script in ASP?
      If yes then is there another
      script that will work in WP?

      Thanks newmoon:confused:
      Signature
      Mobiusman talks about the Head Brain/Gut Brain system. Did you know you have two different brains?
      {{ DiscussionBoard.errors[2155869].message }}
      • Profile picture of the author newmoon
        sir, I have already answer you.

        here is the PHP code to generate password:
        In PHP it is easier. giving one example:



        please see the attachment. don't know why PHP code does not work here (even with PHP bbcode)
        {{ DiscussionBoard.errors[2155898].message }}

Trending Topics