3

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 :)

KSubedi
  • 443
  • 1
  • 7
  • 17

3 Answers3

3

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

  • 1
    I sent you an email on the api page. Please get back to me soon. And also, can i know what detection technique is used on whoishostingthis.com so that me as well as other developers could use it on different projects. Thanks :) – KSubedi Mar 15 '11 at 18:15
  • 1
    @QualityNonsense If your API service is a paid service? – Sandeep Pattanaik Jul 27 '15 at 12:01
2

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.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • Should be pointed out that ARIN is the North-American registry. There's other registries for other geographic regions (africa, europe, asia-pacific, etc...). But at least ARIN will tell you who to query if they're not the registrar for the the IP you're looking at. – Marc B Mar 14 '11 at 20:02
  • Thanks a lot, i didnt know that arin would have the host info about the ip,i will just use the arin api to grab the name of host. And yes, the owner of the ip might be someone broader than the host, but in my case, that will work as something is better than nothing. Thanks :) And is there a way to get the ip whois of all the whois servers from one api? I could work on that myself but an easier api would be great :) – KSubedi Mar 14 '11 at 20:02
  • @Marc B Thanks from my side as well :) – KSubedi Mar 14 '11 at 22:02
0
<?php 
function ipwhois(){
    $ip_info = 'https://ipwhois.app/json/'.$_SERVER['REMOTE_ADDR'];
    $ch = curl_init();curl_setopt($ch, CURLOPT_URL, $host);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    return curl_exec($ch);
    curl_close($ch); 
 }
 $org = strtolower(json_decode(ipwhois())->org);
 echo $org;
?>