-1

I'm using php whois lookup to fetch details of an ip and I am very much successful in it. But I need to detect whether the ip belongs to an individual or an organization.

For example if I browse my tracking website from home it is my individual ip but if I browse it from my office (my company) it is an organization. The fact is I want to track all "company visitors" visiting my site. I'm not interested in individuals. So I need a way to differentiate between the two. Since if I go for whoislookup of individual ip, it returns the ISP as Organization and for generic organization ip it returns the organization name. So basically I need to detect whether the ip is ISP or Generic Organization.

alexandresaiz
  • 2,678
  • 7
  • 29
  • 40
krishna
  • 923
  • 3
  • 15
  • 42
  • Some code would actually make an answer easier as we could then see how you are doing what you say you are doing, – RiggsFolly Sep 11 '15 at 13:41
  • Such a mess here - don't mix lookup results with data you are to scrape out of web requests or tracking visitors. They are totally different. – sitilge Sep 11 '15 at 13:45
  • thanks for your responses. i am using PHPwhois lookup to fetch the data based on the visitors ip as given here. https://ssl.ols.es/whois/index.php?query=199.7.97.1&output=nice Here you can see "OrgName: 'Endless Mountains Health Systems'" this is an organization name who might have visited my site i grabbed its ip and found its an organization. Now please try your individual ip now you will get your ISP as organization name. even though your ip is individual that is non organization ip. i need to differentiate between these two. – krishna Sep 11 '15 at 13:53
  • So your question is basically what data you can use to cross-reference? – StarShine Sep 11 '15 at 14:16
  • yes i need to differentiate – krishna Sep 13 '15 at 03:52
  • any body know about this? – krishna Sep 14 '15 at 07:33
  • IS there any way to know whether it is top ISP or not – krishna Sep 18 '15 at 11:26
  • RIRs allocate IP blocks to organizations, not to individuals. – Patrick Mevzek Jan 02 '18 at 19:35

1 Answers1

0

Try to get the Internet host name corresponding to a given IP address with this ->

string gethostbyaddr ( string $ip_address )
Josip Ivic
  • 3,639
  • 9
  • 39
  • 57