how to find domain's ip?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

how to find domain's ip?

Post by itsmani1 »

Hi,

I want to find IP against a domain name and i also want to find other domains on a given IP? Is there any way i can do it with php? Thanks in advance.

Regards,
adroit
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2008 1:25 am
Location: India
Contact:

Re: how to find domain's ip?

Post by adroit »

Hi itsmani1,

Use this to get IP from domain name.
$ip = gethostbyname('www.example.com');

Regards,
Adroit
http://www.adroitsoftware.org
Post Reply