• PHP Video Tutorials

PHP - geoip_netspeedcell_by_name()



The geoip_netspeedcell_by_name() function can get an Internet connection speed.

Syntax

string geoip_netspeedcell_by_name( string $hostname )

The geoip_netspeedcell_by_name() function can return an Internet connection type and speed corresponding to hostname or IP address. This function is available only if using GeoIP Library version 1.4.8 or newer.

The geoip_netspeedcell_by_name() function is currently available only to users who have bought a commercial GeoIP NetSpeedCell Edition. A warning can be issued if a proper database can't be located.

The return value is a string, common values are:

  • Cable/DSL
  • Dialup
  • Cellular
  • Corporate

The geoip_netspeedcell_by_name() function can return the connection speed on success, or false if an address can't be found in the database.

Example

<?php
   $netspeed = geoip_netspeedcell_by_name("www.tutorialspoint.com');

   if($netspeed) {
      echo "The connection type is: ". $netspeed;
   }
?>
php_function_reference.htm
Advertisements