@mike_mech thx za pomoc, na stronce znalazłem bardzo dużo informacji i pomocy

Przy okazji pokaże wszystkim innym zainteresowanym jak trzeba to zrobić...
Tworzymy tabele w bazie danych, np. o nazwie "ip":
CREATE TABLE `ip` (
`IP_FROM` double NOT NULL DEFAULT '0',
`IP_TO` double NOT NULL DEFAULT '0',
`COUNTRY_CODE2` char(2) NOT NULL DEFAULT '',
`COUNTRY_CODE3` char(3) NOT NULL DEFAULT '',
`COUNTRY_NAME` varchar(50) NOT NULL DEFAULT ''
) TYPE=MyISAM;
Później musimy naszą tabele wypełnić danymi - ściagamy plik:
BazaI dodajemy go do bazy danych...
następnie używamy skryptu:
<?
//---------------------------------------------------
// Sample code to display Visitor Country information
// php 4
//---------------------------------------------------
// Establishing a database connection
$dbh=mysql_connect("localhost:3306","$MYSQL_USERNAME","$MYSQL_PASSWORD");
// Query for getting visitor countrycode
$country_query = "SELECT country_code2,country_name FROM iptoc ".
"WHERE IP_FROM<=inet_aton('$REMOTE_ADDR') ".
"AND IP_TO>=inet_aton('$REMOTE_ADDR') ";
// Executing above query
// Fetching the record set into an array
// getting the country code from the array
$country_code=$ccode_array['country_code2'];
// getting the country name from the array
$country_name=$ccode_array['country_name'];
// Display the Visitor coountry information
echo "$country_code - $country_name";
// Closing the database connection
?>
Kod pobrany ze strony...
Jeszcze trzeba poprawić adresy hosta, hasło, login i nazwe bazy danych i tabeli
I elegancko powinno wyświetlać