1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need to create 80.000 unique vouchercodes.......

Discussion in 'BlackHat Lounge' started by kawamaster, Oct 20, 2011.

  1. kawamaster

    kawamaster Registered Member

    Joined:
    Oct 3, 2009
    Messages:
    91
    Likes Received:
    34
    Hi all,

    For my whitehat webshop i need to create 80.000 vouchercodes. Does anyone have a clue how to generate random non sequential codes?
     
  2. gsy159

    gsy159 Power Member

    Joined:
    Apr 29, 2011
    Messages:
    656
    Likes Received:
    158
  3. saxgod

    saxgod Regular Member

    Joined:
    Sep 19, 2010
    Messages:
    351
    Likes Received:
    337
    Do they need to be lettercombinations ?
    Why u no use:

    PHP:
    <?php
    $coupons 
    80000//number of coupons
    $size 10//number of characters
    for ($i=0$i<$coupons$i++) {
       echo 
    strtoupper(substr(md5(time().rand(10000,99999)), 0$size));
       echo 
    "<br>\n";
    }
    Output looks like:
    Code:
    858EB40BDA
    C39E377A3F
    CDFE6CA38B
    A8957B97F5
    CC200D78D1
    3FD88BE646
    4F22E07779
    E5B91D334F
    AA5EBDA270
    7A64AAADD9
    06362E414F
    Can be modified to write to DB directly to store the coupons
     
  4. Stalli0n

    Stalli0n Junior Member

    Joined:
    Nov 17, 2010
    Messages:
    115
    Likes Received:
    83
    Location:
    Europe
    I can generate them for you.
    Just need to know the url of the webshop :D
     
    • Thanks Thanks x 1
  5. kawamaster

    kawamaster Registered Member

    Joined:
    Oct 3, 2009
    Messages:
    91
    Likes Received:
    34
    thanks for the tips, lol at the last one
     
  6. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    There 's a thanks button kawamaster ;)