Login   Register  
PHP Classes
elePHPant
Icontem

File: Example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2005-06-14 03:00
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'>";
?>