• PHP Video Tutorials

PHP - geoip_org_by_name()



The geoip_org_by_name() function can get an organization name.

Syntax

string geoip_org_by_name( string $hostname )

The geoip_org_by_name() function can return the name of an organization that an IP has assigned to.

This function is currently available only to users who have bought a commercial GeoIP Organization, ISP, or AS Edition. A warning can be issued if a proper database can't be located.

The geoip_org_by_name() function can return an organization name on success, or false if the address can't be found in the database.

Example

<?php
   $org = geoip_org_by_name("www.tutorialspoint.com");
   if($org) {
      echo "This host IP is allocated to: " . $org;
   }
?>
php_function_reference.htm
Advertisements