Reset Password

Advanced Search
Your search results

Run php

July 8, 2018 by Tony

[insert_php]

$ip = $_SERVER[‘REMOTE_ADDR’];
$query = @unserialize(file_get_contents(‘http://ip-api.com/php/’.$ip));

if($query && $query[‘status’] == ‘success’) {
echo ”.$query[‘city’].”;
} else {
echo ‘Unable to get location’;
}

$price = $query[‘city’];

if($price == ‘Nonthaburi’) {
echo ‘
฿30,489 per month’;
}

else if ($price == ‘Bangkok’){
echo ‘
฿30,489 per month’;
}

else if ($price == ‘Pattaya’){
echo ‘
฿26,549 per month’;
}

else if ($price == ‘Hua hin’){
echo ‘
฿24,233 per month’;
}

else if ($price == ‘Chiang Mai’){
echo ‘
฿28,489 per month’;
}

else if ($price == ‘Phuket’){
echo ‘
฿20,702 per month’;
}

[/insert_php]