In PHP is there a function to do a reverse lookup on a domain name to find out how many websites are hosted on the particular shared hosting server that domain name is hosted on. Or, a way to do this with PHP?
Now, I'm already aware of the online services that offer this. However, I want to write a script to do it myself. I just can't figure it out.
Any suggestions that are not suggesting the use of a 3rd party service would be great.
What to Know. If you know the IP address, enter it on ARIN WHOIS to view ownership. To find an IP address, open Windows command prompt (Start + CMD on Windows) > type ping websitename.com. To find an IP address owner if you don't know the IP address, use Register.com, GoDaddy, or DomainTools.
In order to obtain the IP address of the server one can use ['SERVER_ADDR'], it returns the IP address of the server under the current script is executing. Another method is using the ['REMOTE_ADDR'] in the $_SERVER array.
A reverse IP domain check takes a domain name or IP address pointing to a web server and searches for other sites known to be hosted on that same web server. Data is gathered from search engine results, which are not guaranteed to be complete.
In PHP just use
$domain = gethostbyaddr($ip);
good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With