Jump to content
Sign in to follow this  
Xiija

llRequestURL question...

Recommended Posts

just curious about what this does?

 If i have a prim, and it requests a URL, will any HTTP requests from another prim go to this

 one just like they go to a webpage? Can this prim respond like a webpage?

 .... i'm just wondering if I could use this method without needing any php...

 

 Thanx for any info :)

 

Share this post


Link to post
Share on other sites

Yes, you can use this to make an in-world web server, but there are some serious limitations. First of course is the memory limit of the LSL scripts (for someone used to server coding in PHP, 64kB can be tiny). Second, your server cannot send HTML as a response (more precisely, you cannot set the content type of the response as HTML) to the client unless the client is the Second Life viewer and is owned by the same person who owns the server (see the comments on llSetContentType). Finally, the actual URL allocated to the script can change during the life of the script (e.g. sim restarts or the prim moves to another sim, etc.), which can make using a prim as a long-term server a bit tricky.

Short answer: serving plain text or JSON are quite doable, and there are some examples on the LSL wiki... serving HTML is possible but rather constrained.

I hope this helps!

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
Reply to this topic...

×   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...