Find who is hosting a website using PHP

狂风中的少年 提交于 2019-12-23 18:16:29

问题


I am developing a website to show information about a website like ip, location, coordinates, flag of country, dns entries and more. I managed to collect everything, but the only thing left is to find who is hosting the website.

I saw in whoishostingthis.com that you could find the name of datacenter or host of any domain which is exactly what i wanted. I did a lot of research on how to collect that data, but nothing worked till now. I know that it has something to do with reverse dns , but i dont know how to get the name of the datacenter using reverse dns.

I could just grab the name of the host from whoishostingthis.com using curl and extract the data, but i dont want to do that as it might violate their tos or something. So, does anyone know how to collect that data? If i could find that anyhow (even using a linux binary or something), i could import that to php.

Any help would be appreciated. Thanks :)

EDIT: Just to let you guys know, i tried using the RESTful API from arin, but the problem is that it can display the organization information about the ip addresses in america, but if it is outside north america, it just displays the regional IP authority. For example, if you go to http://ip.nex.im/?q=wireshock.com , which is hosted in usa, it shows hostdime inc, which is true, but if you go to http://ip.nex.im/?q=www.ovh.co.uk , it just shows "RIPE Network Coordination Centre". You can try other ip's http://ip.nex.im/?q=[IP OR DOMAIN]. And i could not find an api for other regional ip authorities like ripe or others that can display the organization that owns the ip address. If i find something that works, i will make an open api that anyone can use. And if anyone knows any other way, please reply. Thanks :)


回答1:


The best way to get this is by going to the source: ARIN

Of course, you can only make educated guesses. Often times, the holder of the IP block will be some bigger ISP that your hosting provider connects to.




回答2:


I own WhoIsHostingThis.com. We have an API...

http://www.whoishostingthis.com/our-api/

...so PM me/meail me and we'll get you setup ASAP.

Richard



来源:https://stackoverflow.com/questions/5303726/find-who-is-hosting-a-website-using-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!