some old sources which using http://www.glbasic.com/forum/index.php?topic=5400.msg42237#msg42237 (http://www.glbasic.com/forum/index.php?topic=5400.msg42237#msg42237) will not work now ,because
website has some changes.
i think a little extra website on GLBASIC.com can help a lot in the future.
Such a service is always best to have on your own web-server. It's very simple to set up and you don't have to depend on someone elses server. If your game gets popular it does not risk killing this server either :-)
Make a file containing this code and upload to your server.
<?php
echo $_SERVER['REMOTE_ADDR']
On http://ip.spicypixel.net I use this...
<?php
//--------------------------------------------
// Get User IP Address
//--------------------------------------------
$myip = getRealIpAddr();
echo $myip;
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
?>