Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

PHP 3/2-letter/Number snippet

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch
Impact
41
I have these snippets, think I got them off this site, and they list letter combos etc. I want to make it so I can add a tld to the end of all the combos but when i try the tld is in front and not at the end here are the snippets:

2 # combos
Code:
<?
/*
1 - 999
*/
$ini = 0;
$fin = 99;
for($i=$ini; $i<=$fin; $i++)
{
printf( "%s<br />\r\n", str_pad($i, 2, "0", STR_PAD_LEFT) );
}
?>

3 letter combos
Code:
<?

$letra = array();
for($i=97; $i<=122; $i++)
{
$letra[] = chr($i);
}

foreach($letra AS $a) {
foreach($letra AS $b) {
foreach($letra AS $c) {
echo "$a$b$c<br />\r\n";

}
}
}
?>

3 # combos
Code:
<?
/*
1 - 999
*/
$ini = 0;
$fin = 999;
for($i=$ini; $i<=$fin; $i++)
{
printf( "%s<br />\r\n", str_pad($i, 3, "0", STR_PAD_LEFT) );
}
?>

anyone know how to pop in a schalar that would be at the end of all the combos?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
By the "end" I'm guessing you mean on the right side such as:

00TLD-HERE

?
 
0
Close
right
 
0
Close
Wouldn't this work?

Code:
printf( "%sTLDHERE<br />\r\n", str_pad($i, 3, "0", STR_PAD_LEFT) );
 
0
Close
got bored...

PHP:
<?
$ext = "org";
$letra = array();
for($i=97; $i<=122; $i++)
{
$letra[] = chr($i);
}

foreach($letra AS $a) {
foreach($letra AS $b) {
foreach($letra AS $c) {
$str[] = "$a$b$c";

}
}
}
function docheck($name, $ext)
{
	$whois=array();
	$whois[de] = "No entries found for the selected source";
	$whois[fr] = "No entries found for the selected source";
	$whois[co.uk] = "No match for";
	$whois[com] = "No match for";
	$whois[net] = "No match for";
	$whois[org] = "Not found";
	$whois[ch] = "We do not have an entry in our database matching your query";
             
	$domain = "$name.$ext";
	ob_start();
    system("whois {$domain}");
    $whoisdata = ob_get_contents();
    ob_end_clean();
    $text = $whois[$ext];
    if(eregi($text, $whoisdata) == true)
    {
	    return true;
 	}
 	else
	{
		return false;
	}
}
foreach($str AS $name)
{
	flush();
	sleep(2);
	if(docheck($name,$ext)==true)
	{
		print("$name.$ext - Available<BR>");
	}
	else
	{
		print("$name.$ext - Unavailable<BR>");
	}
}
?>

I dont suggest removing flush() and sleep(2)

This will check if its available or not...

Have fun...

please donate np$ if you use it ;)
http://phpprint.com/whois.php for example of the code above... if you need help just ask
 
1
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back