View Single Post
Old 09-04-2008, 08:29 AM  
fluffygrrl
So Fucking Banned
 
Join Date: May 2006
Posts: 2,187
Quote:
Originally Posted by fluffygrrl View Post
Let's see what I can do for you.
Okay, here it is :

Code:
$data = file("iplist-v3.txt");

$ipbits = explode('.',$_SERVER["REMOTE_ADDR"]);
$ipnum =  $ipbits[3] + $ipbits[2]*256 + $ipbits[1]*256*256 + $pibits[0]*256*256*256;

foreach ($data as $line) {

	$bits = explode('|',$line);
	if ($ipnum <= $bits[1])&&($ipnum >= $bits[0]) echo "Country : ",$bits[2];
}
The data file is http://polimedia.us/elance/iplist-v3.txt

Cheers.
fluffygrrl is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote