Reputation: 316
How i can know if the IP host a sites or not by PHP (Reverse IP) ?
For example :
This IP 62.75.138.253 host 5 sites www.earthwar.de , video-4u.com ..ect
If i have and IP i just need to know if it host a websites or not
I think gethostbyaddr is not useful here
Could anyone help please ?
Upvotes: 0
Views: 216
Reputation: 449385
How i can know if the IP host a domains or not by PHP ?
There is no single function for this: It's a non-trivial task. gethostbyaddr()
will get you the one domain name that was configured to be the host name for the IP. That's about all you can get easily.
There are various companies on the web that collect domain names, resolve them, and store the information in a database. It is possible that there are paid services that offer you access to an API, but that doesn't seem to be what you have in mind.
Upvotes: 1