Location: PHPKode > scripts > IP_to_country class > ip_to_country-class/test.php
<?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 />";
?>


Return current item: IP_to_country class