PHP Classes

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

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

Contents

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

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

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

$netspeed = geoip_country_id_by_addr($gi, "24.24.24.24");

//print $n . "\n";
if ($netspeed == GEOIP_UNKNOWN_SPEED) {
    print
"Unknown\n";
} else {
    if (
$netspeed == GEOIP_DIALUP_SPEED) {
        print
"Dailup\n";
    } else {
        if (
$netspeed == GEOIP_CABLEDSL_SPEED) {
            print
"Cable/DSL\n";
        } else {
            if (
$netspeed == GEOIP_CORPORATE_SPEED) {
                print
"Corporate\n";
            }
        }
    }
}

geoip_close($gi);

?>