Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Valerio Giuffrida  >  IP_to_country  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Test script
Class: IP_to_country
Determine the country of an IP address using Whois
Author: By
Last change:
Date: 7 years ago
Size: 652 bytes
 

Contents

Class file image Download
<?php
include("ip2country.class.php");
$a = new ip2country("countries.txt","flags/");
$arr=$a->parseIP("85.46.225.56");
echo 
"<img src=\"".$arr[2]."\" title=\"".$arr[1]."\">".$arr[0]."<br />";

$arr=$a->parseIP("217.87.11.238");
echo 
"<img src=\"".$arr[2]."\" title=\"".$arr[1]."\">".$arr[0]."<br />";


$arr=$a->parseIP("85.254.90.8");
echo 
"<img src=\"".$arr[2]."\" title=\"".$arr[1]."\">".$arr[0]."<br />";

$arr=$a->parseIP("195.12.55.6");
echo 
"<img src=\"".$arr[2]."\" title=\"".$arr[1]."\">".$arr[0]."<br />";

$arr=$a->parseIP("62.78.137.162");
echo 
"<img src=\"".$arr[2]."\" title=\"".$arr[1]."\">".$arr[0]."<br />";
?>