PHP lookup ISP of an IP (without paying)

Associate
Joined
8 May 2009
Posts
296
Hi,

I've made a simple facility which reads a big list of IPs, and outputs where they're based.

I used GeoIP to do this.

I'd now like to get the ISP that the IP's belong to but I'm struggling to find a way other than one or two paid services. As this is simply a home project I'd rather not pay.

Does anyone know of any solutions to this? (Or is anyone willing to pay for the service for me? :D )

Thanks,
Redrabbit
 
Code:
$ip = "185.103.4.0";

exec('whois '. $ip, $output);

foreach ($output as $record) {
    if (strpos($record, 'org-name') !== false) {
        $owner =  trim(substr($record, strpos($record, ":") + 1));
        echo $owner ."\n";
    }
}

Hey thanks for that.

This unfortunately only works on a very limited set of IPs.

I'm now looking at paid solutions. I'd be willing to pay up to about 20 USD or GBP or similar for access to the records.
 
Back
Top Bottom