PHP Classes

File: Example.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   Country From IP   Example.php   Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: Country From IP
Lookup the country of a given IP address
Author: By
Last change:
Date: 19 years ago
Size: 332 bytes
 

Contents

Class file image Download
<?php

require_once('CountryFromIP.inc.php');

$ip ='202.164.32.81';
//$ip ='210.25.55.2';

$object = new CountryFromIP();

$countryName = $object->GetCountryName($ip);
$flagPath = $object->ReturnFlagPath();

echo
"<BR> <B>Country: </B>".$countryName;
echo
"<BR> <B>Flag: </B> <img src=".$flagPath." border='0'>";
?>