Reverse IP Lookup Using PHP

PHP has a function to reverse lookup a domain name to find out how many sites are hosted on a particular hosting server hosting the domain name. Or how to do it with PHP?

Now I already know about online services that offer this. However, I want to write a script to do it myself. I just can't understand.

Any suggestions that do not involve the use of a third-party service will be excellent.

+5
source share
5 answers

There is no sure way to do what you ask.

DNS IP- , "1.5.7.9", "9.7.5.1.in-addr.arpa". PTR, . , "example.com" "1.5.7.9" A, "9.7.5.1.in-addr.arpa" "example.com".

IP- PTR. , , . , , IP-, - , ( ), - .

, IP-. , .

+2

PHP

$domain = gethostbyaddr($ip);

!

+6

... , Python, darkjumper

, , . Python php

ip- , -m

./darkjumper.py -t stackoverflow.com -m

[+] Target set : stackoverflow.com
[+] Use proxy  : None
[+] Verbocity  : False
[+] Trying reverse your target ip...
[+] Please wait...
-----------------------------------------
http://stackoverflow.com
http://gadgets.stackexchange.com
http://webmasters.stackexchange.com
http://stats.stackexchange.com
http://gaming.stackexchange.com
http://gamedev.stackexchange.com
http://photo.stackexchange.com
http://cooking.stackexchange.com
http://chat.meta.stackoverflow.com
http://stackoverflow.com
http://stackoverflow.com

----------------------------------------
[+] Found : 12  Domains hosted at this IP
----------------------------------------
+4

, - : - IP-. .

http://pink.bikeshed.com? http://red.bikeshed.com? http://white.bikeshed.com? 754 X11 rgb.txt, , , . " " " " ...

0

, , , (/) - IP-.

When someone asks for any given domain / IP address, you just need to show all other domains that use the same IP address, if you do not have the specified domain yet, you just need to resolve the IP address and save his.

It would be quite easy (and relatively quick) to solve the problem mentioned in @sarnold by simply updating all the domains that are on the same IP address of the requested domain, or just the domain itself, possibly with a limit of 1 update per day or something- something like that.

0
source

All Articles