How I can know the Domain for an IP by PHP?

后端 未结 4 516
生来不讨喜
生来不讨喜 2020-12-11 12:05

How I can know the Domain for an IP by PHP?

I have used this code



        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 12:53

    Your PHP is correct, earthwar.de is the correct answer

    eugen@lucidhome:~$ nslookup
    > set q=ptr
    > 62.75.138.253
    Server:     192.168.232.1
    Address:    192.168.232.1#53
    
    Non-authoritative answer:
    253.138.75.62.in-addr.arpa  name = earthwar.de.
    
    Authoritative answers can be found from:
    > 
    

    This ofcourse doesn't mean, that other names (like german-proxy.de) do not point to the same address, but there is no way to find all of them.

    Update:

    eugen@lucidhome:~$ nslookup 
    > set q=a
    > german-proxy.de.     
    Server:     192.168.232.1
    Address:    192.168.232.1#53
    
    Non-authoritative answer:
    Name:   german-proxy.de
    Address: 62.75.138.253
    > earthwar.de.
    Server:     192.168.232.1
    Address:    192.168.232.1#53
    
    Non-authoritative answer:
    Name:   earthwar.de
    Address: 91.143.85.129
    > 
    

    so this is a good example. Fact is: There aint noth'n ya can do 'bout it, dude!

提交回复
热议问题