Xiija Posted February 20, 2015 Share Posted February 20, 2015 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 :) Link to comment Share on other sites More sharing options...
Loraan Fierrens Posted February 20, 2015 Share Posted February 20, 2015 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now