seany123 Posted October 7, 2010 Share Posted October 7, 2010 What im looking to do is basically get every combination of a string. example: $characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!/£$%^&*()+@#?"; and store each individual result in my database.... so basically i could look in my MYSQL database and look through however million entries there are. note - min length 3. max length 10. anyone help me? Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/ Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2010 Share Posted October 7, 2010 You might want to take a minute to figure out roughly how many combinations that will generate. Saying "however many million" is a gross understatement. Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1119652 Share on other sites More sharing options...
seany123 Posted October 18, 2010 Author Share Posted October 18, 2010 well i worked it out to be in the billionaires Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123211 Share on other sites More sharing options...
fortnox007 Posted October 18, 2010 Share Posted October 18, 2010 this may sound stupid but why would you need to populate your database with this info if you can verify the same using 1 line of code in a regex? or is it for a special redeem code system of some kind Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123214 Share on other sites More sharing options...
Pikachu2000 Posted October 18, 2010 Share Posted October 18, 2010 It would be roughly 76*76*76*76*76*76*76*76*76*76 or 6.42888893234x1018. In other words, a whole shitload. Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123215 Share on other sites More sharing options...
seany123 Posted October 18, 2010 Author Share Posted October 18, 2010 This was just going to be a little project on decrypting Md5 hash's... but first i needed ALOT of different letter combinations (obviously words too...etc), to then transfer into MD5... then obviously to compare with the MD5. Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123221 Share on other sites More sharing options...
fortnox007 Posted October 18, 2010 Share Posted October 18, 2010 This was just going to be a little project on decrypting Md5 hash's... but first i needed ALOT of different letter combinations (obviously words too...etc), to then transfer into MD5... then obviously to compare with the MD5. Nice Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123222 Share on other sites More sharing options...
seany123 Posted October 18, 2010 Author Share Posted October 18, 2010 in the end i settled with a grabing code with sends the md5 hash to 7 different sites and retreives the result. http://seany.j-site.info/md5.php Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123223 Share on other sites More sharing options...
fortnox007 Posted October 18, 2010 Share Posted October 18, 2010 in the end i settled with a grabing code with sends the md5 hash to 7 different sites and retreives the result. http://seany.j-site.info/md5.php cool stuff Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123229 Share on other sites More sharing options...
seany123 Posted October 18, 2010 Author Share Posted October 18, 2010 Just wondering though i wonder how long it would take for php / mysql to run a query through lets say 1 Billion rows... anyone have any idea? Quote Link to comment https://forums.phpfreaks.com/topic/215303-getting-every-combination-of-a-string-and-storing-in-a-db-table/#findComment-1123230 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.