Http server

From Second Life Wiki
Revision as of 20:02, 4 August 2009 by Wiki Scribe (talk | contribs) (Robot: <pre> -> <lsl>)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.


Event: http_server( integer event_type, string data ){ ; }

Triggered when an HTTP server changes states.

• integer event_type Constant denoting event type.
• string data Event data.
Event Type Description
HTTP_SERVER_ACTIVATED 1 HTTP Server has been opened.
HTTP_SERVER_DEACTIVATED 2 HTTP Server has been closed.


<lsl>integer Activate = 1; default {

   touch_start(integer t) // Touch Start/Stop HTTP Server
       if (Activate)
           llHTTPServer(); // Open An HTTP Server.
           llHTTPServerRemove(); // Closes Current HTTP Server.
       Activate != Activate;
   http_server(integer event_type, string data)
       if (event_type == HTTP_SERVER_ACTIVATED)
           //Data Is The HTTP Servers URL.
           llOwnerSay("HTTP Server Activated At: " + data);
       else if (event_type == HTTP_SERVER_DEACTIVATED)
           //Data Is Empty String.
           llOwnerSay("HTTP Server Has Been Deactivated!");

} </lsl>


Zero Linden's Office Hours Discussion On Incoming HTTP: [1]
PJIRA feature requests:
Please go vote if this feature is important to you.

See Also


•  http_request


•  llHTTPServer For opening an llHTTPServer.
•  llHTTPServerRemove For removing the current HTTP server from a script.
•  llGetHTTPServerURL For retrieving the current HTTP server URL.
•  llHTTPResponse For replying to HTTP requests.
•  llEscapeURL
•  llUnescapeURL

Deep Notes