Resolve domains to ip

Posted by alphix, 09-21-2008, 12:33 AM
Hi, I'm trying to write a script that resolves a hostname to ip and I've managed to come up with the following: However, I would like the $host to be read (via a loop?) from a list of domains (i.e. from domains.txt) where the domains are listed in such order in the file.. domain1.com domain2.com domain3.com How do I go about doing it?

Posted by DigitalLinx, 09-21-2008, 01:14 PM
Untested written in the quick reply box, hope it works

Posted by alphix, 09-23-2008, 06:04 AM
Hi, The output result was like this.. Please advise... thanks!

Помог ли вам данный ответ?

 Распечатать статью

Также читают

Protection against shell scripts ?

Posted by bin_asc, 09-14-2007, 12:24 PMI was wondering how do you guys protect your servers...

.htaccess to *.com/index.php/example

Posted by shally87, 03-12-2010, 02:36 PMI am using wordpress and currently i have problem with...

problem when set up dhcp server

Posted by tinhnho, 07-17-2007, 04:43 PMI follow instruction from redhat to setup my Centos acts...

Cronjob issue

Posted by CymraegWalesHosting, 11-16-2012, 11:25 PMHi all, Hopefully this is a simple fix....

Domain names diferent servers.

Posted by shakybaky, 06-26-2008, 02:34 PMhello i have two nix vps's One of the vps is setup and...