I have code running on all of my sites that attempts to reverse the DNS for each IP that visits. This uncovers the organization for many visitors but unfortunately it still leaves a lot of IPs that don't have corresponding DNS entries.

There's a public database of who owns what IP address. Using two ARIN WHOIS API calls (shown below) you can pull the organization and address for every IP (usually the address of an ISP). This can be used to replace random numbers (e.g. 154.03.34.11) with entries like "GONET (Ministry of Government Services, Infrastructure Technology Services)" and "Alberta PWSS, Telecommunications Division (10365 - 107 Street)".

ARIN WHOIS API Calls

The parameters are shown below, encapsulated by curly brackets.

http://whois.arin.net/rest/nets;q={AAA.BBB.CCC.DDD}?showDetails=true&showARIN=false&ext=netref2

http://whois.arin.net/rest/org/{ARIN Organization Handle, obtained through XML result from API call above}

PHP code for looking up IP owners: