File: vendor/geoip/geoip/examples/domain.php

Recommend this page to a friend!
  Classes of Ganesh Kandu  >  kchat  >  vendor/geoip/geoip/examples/domain.php  >  Download  
File: vendor/geoip/geoip/examples/domain.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: 418 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");

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

$domain = geoip_org_by_addr($gi, "80.24.24.24");
print
"80.24.24.24 belongs to " . $domain . "\n";

geoip_close($gi);

?>


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