Communications Technology Articles - TV News - Kamala Harris - Valentine's Day Gifts - Bob's Free Stuff Forum

PDA

View Full Version : php combination generator


greenstar91
May 20th 2008, 11:39 am
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

Awesome Ninja
May 20th 2008, 11:52 am
Would you be selecting the combinations from a database? or perhaps a text list?

greenstar91
May 20th 2008, 12:05 pm
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.

Awesome Ninja
May 20th 2008, 12:21 pm
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.

I mean where is it getting the list of possible combinations, or is it working it out.

greenstar91
May 20th 2008, 12:26 pm
it would work it out and put results in database or other file

Awesome Ninja
May 20th 2008, 12:52 pm
it would work it out and put results in database or other file

Whats the algorithm to work out the code? Or the method used.

greenstar91
May 20th 2008, 1:00 pm
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.