Im stuck with something. Im trying to make a generator. It will grab info from dns whois every 12 seconds and put it in my mysql database. Herefore i want to generate possible domains without extension (only for .be domains) based on the alphabet.
I have a page that reloads itself every 12 seconds (javascript). Using session variables i should be able to generate a new domainname each time the page reloads.
This far i get, but i have no idea how to generate these words. I started with something simple but im stuck:
Code: Select all
$tekens = array("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","-");
if($counter < count($tekens)){
$domain = "";
for($i=0;$i<$aantal;$i++){
$domain .= $tekens[$counter];
}
print($domain);
$counter++;
//do the actual whois lookup and put it to db
}else{
$counter = 0;
$aantal++;
}where $aantal would be how many times i looped the whole array of $tekens, and $counter would be a counter to loop the array $tekens. These two vars are provided by sessions.
Any idea's to get me started here?
thx a lot