Jump to content

how to get server ip of second life?


Poltergeist Azarov
 Share

Recommended Posts

Hello, I needed sl server ip for some reason today. to do that I sent a packet from inworld to my host and tried to extract ip address and all I got was localhost: 127.0.0.1... Then I contacted to host provider about that and they said I need to talk to second life provider.

Heres the php code that I was using to get visitors ip:

<?PHP

function getUserIP()
{
    $client  = @$_SERVER['HTTP_CLIENT_IP'];
    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
    $remote  = $_SERVER['REMOTE_ADDR'];

    if(filter_var($client, FILTER_VALIDATE_IP))
    {
        $ip = $client;
    }
    elseif(filter_var($forward, FILTER_VALIDATE_IP))
    {
        $ip = $forward;
    }
    else
    {
        $ip = $remote;
    }

    return $ip;
}


$user_ip = getUserIP();

echo $user_ip; // Output IP address [Ex: 177.87.193.134]


?>

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...