php combination generator

Discussion in 'PHP' started by greenstar91, May 20, 2008.

  1. #1
    I have recently finished a combination calculator for finding the number of combinations of a group of numbers.

    http://greenstar91.007sites.com/index.php <<excuse the free hosted site!

    Now I want to create a script that will list every single combination in order for a user defined character set (most likely lower case + numbers) i.e. if user types in 'abcdefghijklmnopqrstuvwxyz0123456789' and 6 combination length. I want the script to list every combination starting from aaaaaa, aaaaab, aaaaac e.t.c.

    I know this is not the best language to be doing it in and akso it will take up a lot of space. i still wish to proceed as then i want to put the results into a database.

    thanks
     
    greenstar91, May 20, 2008 IP
  2. Awesome Ninja

    Awesome Ninja Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Would you be selecting the combinations from a database? or perhaps a text list?
     
    Awesome Ninja, May 20, 2008 IP
  3. greenstar91

    greenstar91 Guest

    Messages:
    221
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    there would be a text input box where the user inputs every character they want and when they press submit all possible combinations are generated and placed in a text file or a database on the server or available as download. space is not an issue.
     
    greenstar91, May 20, 2008 IP
  4. Awesome Ninja

    Awesome Ninja Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I mean where is it getting the list of possible combinations, or is it working it out.
     
    Awesome Ninja, May 20, 2008 IP
  5. greenstar91

    greenstar91 Guest

    Messages:
    221
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it would work it out and put results in database or other file
     
    greenstar91, May 20, 2008 IP
  6. Awesome Ninja

    Awesome Ninja Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Whats the algorithm to work out the code? Or the method used.
     
    Awesome Ninja, May 20, 2008 IP
  7. greenstar91

    greenstar91 Guest

    Messages:
    221
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I think there is a misunderstanding here.

    All I need is some help with making a set group of characters go into every possible combination they can make within 6 digits. I want this to be generated into a dtabase or text file.
     
    greenstar91, May 20, 2008 IP