how to domain's ip?

Discussion in 'PHP' started by dizyn, Sep 5, 2008.

  1. #1
    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,
     
    dizyn, Sep 5, 2008 IP
  2. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #2
    Jalpari, Sep 5, 2008 IP
  3. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can do it with CURL .. so answer is yes, dont' have the code for it though. Tools mentioned by Jalpari are available (to use - dont have source code)

    Thx
     
    pubdomainshost.com, Sep 5, 2008 IP
  4. dizyn

    dizyn Active Member

    Messages:
    251
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    I know the tools i want to do it myself, any guess where to start off?

    Regards,
    dizyn
     
    dizyn, Sep 5, 2008 IP
  5. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
  6. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #6
    As above, gethostbyname will fetch the IP for a given domain name. DomainTools uses a bot to log all sites IPs (most of them, which is why they don't all show up instantly), so you'd have to spider the internets millions of domains and create a database of domain => ip to do the reverse lookup.

    Hope that helps,

    Jay
     
    jayshah, Sep 5, 2008 IP
  7. nepasolutions

    nepasolutions Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you had better to use some API
     
    nepasolutions, Sep 6, 2008 IP
  8. nabz245

    nabz245 Well-Known Member

    Messages:
    677
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #8
    if you running a windows server, you can do the following:

    <?
    echo exec("ping domain.com");
    ?>

    It should output whatever you see in your cmd when you ping a domain. (including response time etc).

    I hope that helps!
    Regards
     
    nabz245, Sep 6, 2008 IP
  9. subkid

    subkid Banned

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I've done that in the past... I can program something like that for you... but not free of course, since it's a pretty uncommon script (meaning you'll not find it anywhere else 4 free).
     
    subkid, Sep 6, 2008 IP
  10. chanakya

    chanakya Peon

    Messages:
    361
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
  11. nabz245

    nabz245 Well-Known Member

    Messages:
    677
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #11
    Don't you mean:
    gethostbyname();

    
    <?
    echo gethostbyname("www.example.com");
    ?>
    Code (markup):
     
    nabz245, Sep 7, 2008 IP
  12. chanakya

    chanakya Peon

    Messages:
    361
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Well he wanted to implement a reverse dns isn`t it ?
     
    chanakya, Sep 7, 2008 IP
  13. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #13
    jayshah, Sep 7, 2008 IP