LSL HTTP server/examples/kellys stupid web status updater

From Second Life Wiki
< LSL HTTP server‎ | examples
Revision as of 12:51, 21 July 2009 by Kelly Linden (talk | contribs) (Created page with '== What == This is a dead stupid, insecure and simple system that will update the floating text above a prim according to what is entered in the web form. Uses html forms, pytho...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What

This is a dead stupid, insecure and simple system that will update the floating text above a prim according to what is entered in the web form. Uses html forms, python and LSL.

index.html

A simple webform that sends the input to our cgi. <html4strict><html>

  <body>
        


<form ACTION="cgi-bin/post.cgi" METHOD="GET"> <textarea name="Message" rows="5" cols="40" onfocus="this.value=; this.onfocus=null;">Enter your status update here.</textarea>

<INPUT TYPE="submit" title="FOO"> </form>

  <body>

</html></html4strict>

post.cgi

A simple CGI that takes GETs and looks for two parameters:

  • URL: if found will write the value to a file
  • Message: if found will read from the file and send the contents to the url in the file

<python> </pyton>

status.lsl

<lsl> default {

  state_entry()
  {
  }

} </lsl>