Jump to content
  • 0
Sign in to follow this  
narolaheh

How to get Linden Lab Server's Ip Address i.e for server sim9014.agni.lindenlab.com? in lsl script.

Question

  • 0

No? I'm pretty sure LL won't give you the IP address for any of their servers, actually. IP addresses are intended to be private, I believe. I don't think LL wants you to have that information, and I don't think there's any legitimate way to get it that you won't get into trouble for. I could be wrong, though; I'm not very tech savvy.

 

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0

No? I'm pretty sure LL won't give you the IP address for any of their servers, actually. IP addresses are intended to be private, I believe. I don't think LL wants you to have that information, and I don't think there's any legitimate way to get it that you won't get into trouble for. I could be wrong, though; I'm not very tech savvy.

 

Share this post


Link to post
Share on other sites
  • 0

Yeah, there is. And contrary to Ariel's answer there's no limitation against doing this; it's an aspect of the foundations of online communication (sorry Ariel ^^)..

You can do it by doing a nameservice lookup against the name you have for the server (ending lindenlab.com).

In Windows this is achieved by going to the Command Prompt window, and typing the command:

nslookup <server name>

Where <server name> is the name you have for the server. There are equivilent processes in Linux/Unix.

To do this via script, you would need quite some fanciness. It isn't possible to do just using LSL.

You would need mulitple language support, as the request for the nameservice lookup would always have to appear as an nslookup-style request (as in, it would talk to the domain name service), to the DNS to which your connected device gives authority.


Editted to add! You can actually do this very simply via LSL and PHP script. All you need to do is have llHTTPResponse call a PHP page on your webserver; the incoming IP of that request will match the IP address of the simulator where the script is located. EASY.

  • Like 2

Share this post


Link to post
Share on other sites
  • 0

Hi,

 

In Our system we are providing balance,deposit,withdraw facility to user. just like Real World ATM.

Let say when user made request for balance at that time ATM call to a server when a user clicks on our ATM and makes a request… a balance, a withdrawal ect… the Second Life server will have to contact our server, in doing so the Second Life server will leave its IP address.

We are passing request using llRequest function.

So, is there any way to get that IP address of secondlife at the time of request ?

We need to get IP Address by using PHP script or using LSL script.

 

Thanks.

Share this post


Link to post
Share on other sites
  • 0

Yes. You can get it in the PHP script, by detecting the incoming IP address from the llHTTPRequest, this is done using a $_SERVER-type variable. My PHP is getting rusty, but a simple Google search tells me $_SERVER['REMOTE_ADDR']; might be the one you need.

Share this post


Link to post
Share on other sites
  • 0

Hi Freya,

 

Thanks for your reply, I wanted to know which PHP functions is returning IP of linden lab server which is sending request to our server. As using php SERVER variable we only get IP of current server. So can you help in this please?

 

I mean as I said, If I have one server abc.com then it will give IP of it only. In short, $_SERVER will give IP of either users local machine detail or server detail.That will not give any requested servers or PC info.

 

Thank you...

Share this post


Link to post
Share on other sites
  • 0

In order to get the simulator's IP address by this method, you will need to store REMOTE_ADDR after making an llHTTPRequest from a script in SL.

When this llHTTPRequest talks to the server, the REMOTE_ADDR will match the IP address of the sim where the script making the llHTTRequest.

You cannot get the IP address of any simulator this way, as you need a script on the region to make the llHTTPRequest. You would have to do that using the DNS system as I outlined earlier.

Share this post


Link to post
Share on other sites
  • 0

Ok, Freya, REMOTE_ADDR will return IP of my PC, Right? I wants to get IP of the sim I.e linden lab. So how can I get it. As using REMOTE_ADDR I can get IP of PC ip only.

Share this post


Link to post
Share on other sites
  • 0

It will return the IP of the device making the HTTP Request!
If you make an LSL script make a HTTP Request via llHTTPRequest it will return the IP of the simulator where the LSL script is located.

If you make the HTTP Request via your browser on your PC, it will return the IP of that PC.

You need to store the IP of the simulator from the LSL-based llHTTPRequest.

Share this post


Link to post
Share on other sites
  • 0

Thanks for reply, Here is what I am currently doing:

Right now I am passing my server URL (on which my PHP script is located) in llHTTPRequest function. So what we need to change there?

 

Do we need to pass something like this "http://sim9142.agni.lindenlab.com:12046/cap/4f08f668-862f-4b10-524d-62a6a219b05d" with each request. I am getting this URL using "llRequestURL" function. Is this correct way to get IP based on URL I am getting using llRequestURL() ?

Share this post


Link to post
Share on other sites
  • 0

The first half of your comment (using the PHP destination in the llHTTPRequest function) is correct, so far as I can tell nothing would need changing.

The second half of your comment makes no sense. The IP gathering must be done by the PHP page that receives the llHTTPRequest. The receipt of the request will populate the SERVER variable REMOTE_ADDR (which should then be stored), to recover the simulator IP address. The IP address stored from the llHTTPRequest will match the IP address of the simulator where the LSL script (the one making the llHTTPRequest) is present.

You might want to understand a little more about HTTP Transit works? It seems there are difficulties explaining this concept. Every request to a server provides the source IP address to the server. This is recoverable and storable and will match the simulator IP.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...