php ile ip adresinden şehir bilgisi bulmak

 <?php 
$ip=$_GET['ip'];
$curl_oturumu =curl_init("http://www.ip-adress.com/");
curl_setopt($curl_oturumu, CURLOPT_HEADER, 0);
curl_setopt($curl_oturumu, CURLOPT_POSTFIELDS, "QRY=$ip");
curl_setopt($curl_oturumu, CURLOPT_RETURNTRANSFER  ,1);
curl_setopt($curl_oturumu, CURLOPT_FOLLOWLOCATION  ,1);
$output= curl_exec($curl_oturumu);
curl_close($curl_oturumu);  
$desc = '#IP Location:(.*?)</b>#si';
preg_match_all($desc,$output,$ddesc);
$sonuc = $ddesc[0][0];
print_r(strip_tags($sonuc)); 
?>

vps mysql conf example

[mysqld]
local-infile=0

max_connections = 500
key_buffer_size = 256M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 8000
thread_cache_size = 256
wait_timeout = 20
connect_timeout = 30
tmp_table_size = 128M
max_heap_table_size = 64M
max_allowed_packet = 32M
net_buffer_length = 16384
thread_concurrency = 2
table_lock_wait_timeout = 30
query_cache_limit = 10M
query_cache_size = 96M
query_cache_type = 1
set-variable=local-infile=0
thread_concurrency = 8
[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 4M
write_buffer = 4M

[myisamchk]
tmpdir=/tmp
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M