File: vendor/geoip/geoip/examples/asn-v6.php

Recommend this page to a friend!
  Classes of Ganesh Kandu  >  kchat  >  vendor/geoip/geoip/examples/asn-v6.php  >  Download  
File: vendor/geoip/geoip/examples/asn-v6.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: kchat
Database driven PHP live chat system
Author: By
Last change:
Date: 2 years ago
Size: 435 bytes
 

Contents

Class file image Download
#!/usr/bin/php -q
<?php

// This code demonstrates how to lookup the country and region by IP Address
// It is designed to work with GeoIP Organization or GeoIP ISP available from MaxMind

include("../src/geoip.inc");

$giasn = geoip_open("/usr/local/share/GeoIP/GeoIPASNumv6.dat", GEOIP_STANDARD);

$ip = '2001:4860:0:1001::68';
$asn = geoip_name_by_addr_v6($giasn, $ip);
print
"$ip has asn " . $asn . "\n";

geoip_close($giasn);

?>


For more information send a message to info at phpclasses dot org.