pyro.699 Posted January 6, 2006 Author Share Posted January 6, 2006 umm, i dont see an echo, or print_r(); anywhere Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 6, 2006 Share Posted January 6, 2006 No there wasn't one, I just needed to know if it errored or not.Anyways, here's one that should display it. <?php $code1 = file('first.combo'); $code2 = file('second.combo'); $code3 = file('third.combo'); $code4 = file('fourth.combo'); $code5 = file('fifth.combo'); $code6 = file('sixth.combo'); $total = count($code1)+count($code2)+count($code3)+count($code4)+count($code5)+count($code6); $totaleach = array(count($code1),count($code2),count($code3),count($code4),count($code5),count($code6)); sort($totaleach); for($i=0; $i<=$totaleach[5]; $i++){ $output[] = $code1[$i].' - '.$code2[$i].' - '.$code3[$i].' - '.$code4[$i].' - '.$code5[$i].' - '.$code6[$i]."<br>\n"; } foreach($output as $key => $value) echo $value;?> Link to comment Share on other sites More sharing options...
pyro.699 Posted January 6, 2006 Author Share Posted January 6, 2006 i get something like this FPFG - FAFG - ZTFP - FFFN - FKFG - FRFGFGFP - FNFP - ZTZG - FFZE - FCFP - FOFPlike theres brs in there or sumthin Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 6, 2006 Share Posted January 6, 2006 Right, this should fix that: <?php $code1 = file('first.combo'); $code2 = file('second.combo'); $code3 = file('third.combo'); $code4 = file('fourth.combo'); $code5 = file('fifth.combo'); $code6 = file('sixth.combo'); $total = count($code1)+count($code2)+count($code3)+count($code4)+count($code5)+count($code6); $totaleach = array(count($code1),count($code2),count($code3),count($code4),count($code5),count($code6)); sort($totaleach); for($i=0; $i<=$totaleach[5]; $i++){ $output[] = $code1[$i].' - '.$code2[$i].' - '.$code3[$i].' - '.$code4[$i].' - '.$code5[$i].' - '.$code6[$i]."<br>\n"; } foreach($output as $key => $value){ $return = strtr($value, "\n", ""); echo $return } ?> Link to comment Share on other sites More sharing options...
pyro.699 Posted January 7, 2006 Author Share Posted January 7, 2006 Thanks alot deathray :)anyway, i spent the lastnight pondering... and i found ut a flaw :(1 code = FPFG-FAFG-ZTFP-FFFN-FKFG-FRFG2 code = FGFP-FNFP-ZTZG-FFZE-FCFP-FOFPthe way i have this set up, it allows you to change around the key, allowing you to have, in this case, 12 keys :)move FGFP up, and FPFG down, and you havea completely new key...so... i thought.... what if i added every possible key to an array... i did i also added every number from 1-1747... now, i dont know if theres a limit on array's , but it dosent seem to eb working veryr well, do u guys have any idea for another wall of securety? using my current keys? AIM - Exiled TwigMSN - joedirt_780@hotmail.com Link to comment Share on other sites More sharing options...
pyro.699 Posted January 8, 2006 Author Share Posted January 8, 2006 Little help here guys Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 8, 2006 Share Posted January 8, 2006 What exactly are you trying to do? I may well have a solution. Link to comment Share on other sites More sharing options...
pyro.699 Posted January 8, 2006 Author Share Posted January 8, 2006 ok :)ill give it all outi have designed a prouduct, that i am selling, i ahve already created the members area.... i just need a code that i can send to the user to allow them into their members area...the way i currently have it set up is as follows:A * B - C + Dnow, the problem with that is, if you have more than one key, you can customize your own, by replacing some parts of the key with another... because its strictly math based...i need someway to make it imposible to reproduce, or recreat a new key, it must be generated by php :)there are 6 textfeilds, each can contail 4 letters(just so you know, A dose not equal 1, B dose not equal 2)Ive also split up (using php) each sections... so, if textfield A, had the letters Q, W, P, C... it would add each of those letters to an arrayive been loovin at encription, but that dosent seem to be working verry well :(I really hope you can help, ive been working 2 days on this, imalready late on this Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 8, 2006 Share Posted January 8, 2006 Do I ever have the solution for you! <?php function nocrypt($num,$s){ return $num; } $i = 0; $donearray = array(); $min = 1; $max = 80; $total = 83; $crypt = crypt; $maxlines = 500; for($num1=$min; $num1<=$max; $num1++){ for($num2=$min; $num2<=$max; $num2++){ for($num3=$min; $num3<=$max; $num3++){ for($num4=$min; $num4<=$max; $num4++){ if($i<$maxlines && $num1+$num2+$num3+$num4 == $total && in_array($crypt($num1,s1).' + '.$crypt($num2,s2).' + '.$crypt($num3,s3).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num3,s3).' + '.$crypt($num4,s4).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num4,s4).' + '.$crypt($num1,s1).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num1,s1).' + '.$crypt($num2,s2).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num2,s2).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num1,s1).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num1,s1).' + '.$crypt($num2,s2).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num4,s4).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num4,s4).' + '.$crypt($num1,s1).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num1,s1).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num2,s2).' + '.$crypt($num3,s3).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num3,s3).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num2,s2).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num3,s3).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num3,s3).' + '.$crypt($num4,s4)."<br>\n", $donearray) == false && in_array($crypt($num1,s1).' + '.$crypt($num3,s3).' + '.$crypt($num4,s4).' + '.$crypt($num2,s2)."<br>\n", $donearray) == false && in_array($crypt($num3,s3).' + '.$crypt($num4,s4).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1)."<br>\n", $donearray) == false && in_array($crypt($num4,s4).' + '.$crypt($num2,s2).' + '.$crypt($num1,s1).' + '.$crypt($num3,s3)."<br>\n", $donearray) == false){ $donearray[$i]=$crypt($num1,s1).' + '.$crypt($num2,s2).' + '.$crypt($num3,s3).' + '.$crypt($num4,s4)."<br>\n"; echo $donearray[$i]; $i++; } } } } } if(count($donearray)!==$maxlines) $checknums = '<br>Try increasing $max and $total to achieve the '.$maxlines.' keys you requested. For best results, $max should be 3 less than $total.'; echo '<br>' . count($donearray) . ' keys generated.' . $checknums;?> This will generate the keysYou give them each one of these. (You can do it automatically with easy modification. When they enter one, you compare it against $donearray. This also allows you to set how many keys you want to generate. //The minimum number in one of the fields. $min = 1; //The maximum number in one of the fields. For best results this should be 3 less than $total. $max = 80; //What the fields should add up to. $total = 83; //Set to crypt if you want to encode them (One way process), or nocrypt if you don't. $crypt = crypt; //How many keys you want to generate. $maxlines = 500; For assigning them, you can give each person the value for the next indice in $donearray. That indice would also act as that person's id, of sorts, and it would be used to check to make sure that they key belongs to them. Link to comment Share on other sites More sharing options...
pyro.699 Posted January 8, 2006 Author Share Posted January 8, 2006 holly ######, man, i love you! ... do you have aim, id like to thank yo in person :)AIM - Exiled TwigMSN - joedirt_780@hotmail.com Link to comment Share on other sites More sharing options...
DeathRay2K Posted January 8, 2006 Share Posted January 8, 2006 I don't have aim, but I've added you on MSN. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now