Reply
Need help with PHP script for IP address of sites
Old 05-01-2008, 07:43 AM Need help with PHP script for IP address of sites
Junior Talker

Posts: 1
Need help with PHP script for IP address of sites

Hi All
I need some assistance with getting the IP address of a web site.

Basically I have to write a PHP page where if a site name is supplied it would return back the IP address of the site as well as specify if the IP Address is Dedicated for that site or a Shared IP Address

I have figured out how to get the IP address of a site in PHP however I am not able to figure out how can I find out whether that IP address is static i.e. dedicated IP for the site or a shared IP that the site is using.

Does anyone know how to get around this problem, using PHP how can I figure out if an IP address of the site is a Dedicated IP address for that site or whether that IP is a shared one.

Any help on this matter is appreciated

Cheers
Asif
jeetesting is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-02-2008, 10:53 AM Re: Need help with PHP script for IP address of sites
addonchat's Avatar
Skilled Talker

Posts: 97
Name: Chris Duerr
It's really not possible to tell without consulting a massive database, and even then it's still hit and miss. It's possible to determine what domains are associated with a specific IP -- http://www.myipneighbors.com/ for example provides this, but even the results provided by that site aren't comprehensive -- I don't think it even takes into consideration round-robin DNS entries, for instance.

You can do an RDNS lookup: http://us.php.net/gethostbyaddr (or system() the *NIX host command) but don't count on a lot of people having properly set reverse DNS for every IP.

People should have a properly setup RDNS record on their mail server at the least. One way to do what you're looking for would be to query the MX record (dns_get_record()) then `host` the answer section and see if it points to the same domain name as that submitted, which it should -- BUT, you'll still find people with dedicated IP addresses using a shared mail server.

If you find a solution, I'd love to hear it.
__________________
Chris Duerr
AddonChat Java Chat Software
http://www.addonchat.com/ - Affiliate Program
addonchat is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help with PHP script for IP address of sites
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12043 seconds with 13 queries