Need help with PHP script for IP address of sites

Discussion in 'Programming/Scripts' started by jeetesting, May 2, 2008.

  1. jeetesting

    jeetesting New Member

    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
     
  2. the_spy

    the_spy New Member

    I don't think it's possible to know this, may be searching the string "dynamic" in the dns of the ip, but it's not always the case
     
  3. opsys

    opsys New Member

    You can use php_curl to save the contents of http://$IPADDRESS and
    http://$SITENAME each to a separate file, run a diff on them, if they match, chances are its a dedicated IP address site.

    Alex
     
    Last edited: Jun 7, 2008
  4. TheRudy

    TheRudy Member

    You have two choices really to find out if ip is dedicated or shared.

    1. Use google and find for a tool that does this, parse the results with PHP. Lots of tools will do this search.

    2. Use msn.com, type into search: ip:IP_ADDRESS and parse the results with PHP. This is the direct way as most of the 1. option tools use this option anyways :) If only one domain appears as a result you have a dedicated IP else its shared.

    None of this two is of course 100% accurate but as far as i know this is the only way to do this.
     

Share This Page