Membership is FREE, giving all registered users unlimited access to every DNForum feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

How can I check if my 100 domains are resolving

Status
Not open for further replies.

Honan

Level 9
Legacy Exclusive Member
Joined
Mar 17, 2003
Messages
3,943
Reaction score
4
Hi
Can you help ?
Is there a free tool to check a list of 100 domain names to see which ones reslove to their web site and which domains are not resolving

Thanks In Advance
 

amplify

Level 5
Legacy Exclusive Member
Joined
Sep 15, 2009
Messages
3,478
Reaction score
1,189
Domains are basically "pointers" as you would see in cPanel on their own. They point to another IP address which is from the nameservers you used. So, if your 100 domains are parked at the same place, open "cmd.exe" from your Start->Run menu and type "TRACERT YOUR1.NAMESERVER.COM" and click enter (repeat for YOUR2.NAMESERVER.COM). This will tell you if the nameserver you're using is resolved or not. To see if the WHOIS record updated on your domains, TRACERT your domain. Hope that helped :)

...Might be a little difficult if all 100 domains are different nameservers though, but they shouldn't be too different unless with someone like Hostgator. If it is, it wouldn't be too difficult to create a batch file with all your nameservers and run it.
 

Honan

Level 9
Legacy Exclusive Member
Joined
Mar 17, 2003
Messages
3,943
Reaction score
4
Thank you amplify for your reply
The 100 domain names have 10 different name servers
Some are parking companies, some are hosting companies
 

amplify

Level 5
Legacy Exclusive Member
Joined
Sep 15, 2009
Messages
3,478
Reaction score
1,189
I'm cooking you up something real nice in PHP; but there's one problem, if the name can't be resolved then you can't run the PHP file. :lol:

This tool may be useful to other people as well, give me a couple more minutes.

You will need two files. One text file of domains.txt as seen below:
PHP:
www.yahoo.com
www.google.com
www.iduhfiuhsduihf.com
www.489u498239832.com
www.whois.net

Separate your domains by a line break.

Your PHP file: resolve.php

PHP:
<?php
// The quickest and worst case of authentication, just makes sure you're the only one to run this script
// http://www.yourdomain.com/resolve.php?pw=YOUR_PASSWORD
$PASSWORD = "yourpassword";
$DOMAINSTXT = "/full/path/to/domains.txt";
function getAddrByHost($host, $timeout = 3) {
   $query = `nslookup -timeout=$timeout -retry=1 $host`;
   if(preg_match('/\nAddress: (.*)\n/', $query, $matches)) {
     return true;
   } else {
     return false;
   }
}
if($pw == $PASSWORD){
  $dn = fopen($DOMAINSTXT, "r");
  $contents = fread($dn, filesize($DOMAINSTXT));
  fclose($dn);
  $dns = split("[\n|\r]", $contents);
  $amt = count($dns);
  $count = 0;
  foreach($dns as &$domain){
    if(!getAddrByHost($domain)){
      echo '<font color="red">Unable to resolve: '.$domain.'</font><br>';
    } else {
      echo '<font color="green">Resolved: '.$domain.'</font><br>';
    }
    if(++$count >= $amt) break;
  }
  unset($domain);
} else {
  echo "Invalid Password!";
}
?>

Be sure to change the location of the domains.txt and to set a password so not just anyone can run the script.

It will output something along the lines of (but pretty):
Resolved: www.yahoo.com
Resolved: www.google.com
Unable to resolve: www.iduhfiuhsduihf.com
Unable to resolve: www.489u498239832.com
Resolved: www.whois.net


Sorry for the delay, dinner interrupted me. If this helped you or you used this script as well, be sure to throw a couple dnf$ my way. Feel free to add additions. :lol:
 
Last edited:

packeted

DNF Member
Legacy Platinum Member
Joined
Dec 12, 2006
Messages
435
Reaction score
0
for i in `cat domainlist`; do
host www.$i > domainlist.output
done
 
Last edited:
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 1) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom