Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The code basically treats the character combination like a base-35 number. It adds one each loop.</p> <pre><code>&lt;?php $char=array("1","2","3","4","5","6","7","8","9","0","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","-"); $doma=array("aero","asia","biz","cat","com","coop","info","int","jobs","mobi","museum","name","net","org","pro","tel","travel","xxx","edu","gov","mil","co.uk","co.nr","co.au","au","ca","co.cc","cc","co","cn","co.jp","de","es","ie","in","it","jp","nl","nz","ru","co.tk","tk","tv","us"); $combo = array(0,0,0,0,0,0,0,0,0,0); //this stores the ten "digits" of the characters $pval = 9; //this is the active "place value", the one that you increment $list = ""; for($i=0;$i&lt;44;$i++) { //loops through doma for($j=0;$j&lt;2758547353515625;$j++) { //loops through character combos, that long number is the permutations for($l=0;$l&lt;10;$l++) { //loop displays combo $list .= $char[$combo[$l]]; } $list .= "." . $doma[$i] . "&lt;br/&gt;"; //add combo to list /*This next part check to see if the active digit is 35. It is is, it sets it equal to zero and looks to the digit on the left. It repeats this until it no longer finds a 35. This is like going from 09 to 10 in the decimal system. */ if($combo[$pval] == 35) { while($combo[$pval] == 35) { $combo[$pval] = 0; $pval--; } } $combo[$pval]++; //whatever digit it left on gets incremented. $pval = 9; //reset, go back to first place value } for($l=0;$l&lt;10;$l++) { $combo[$l] = 0; //reset combo for the next top level domain } } echo $list; //print the compiled list. ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload