<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Corto+Maltese</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Corto+Maltese"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Corto_Maltese"/>
	<updated>2026-07-29T00:21:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Build_the_Viewer_on_Linux&amp;diff=450613</id>
		<title>Talk:Build the Viewer on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Build_the_Viewer_on_Linux&amp;diff=450613"/>
		<updated>2009-08-05T23:20:05Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* gnu/stubs-32.h : No such file or directory */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I had to add &amp;quot;class LLUICtrlFactory;&amp;quot; to llui/lluictrl.h and llui/llviewborder.h to avoid a bunch of problems about that class missing --[[User:Eddy_Stryker|Eddy Stryker]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== llmozlib ==&lt;br /&gt;
&lt;br /&gt;
As [https://lists.secondlife.com/pipermail/sldev/2007-February/000545.html Tofu wrote (Feb 23 2007)], &amp;quot;you shouldn&#039;t generally need to download and build LLMozLib for a SL viewer build unless you&#039;re hacking on LLMozLib itself or porting SL to a platform which we don&#039;t supply pre-built libraries for&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Nonetheless, there&#039;s a need of instructions on&lt;br /&gt;
*how to &#039;&#039;&#039;disable&#039;&#039;&#039; llmozlib in [[Source_archive#2007-Feb-20|FL-1.13.3.58185]] and [[Source_archive#2007-Feb-24|FL-1.13.3.58390]] as explained at [https://lists.secondlife.com/pipermail/sldev/2007-February/thread.html#487 a thread of SLDev@lists.secondlife.com]&lt;br /&gt;
**Add MOZLIB=no to your Scons build command when compiling the source&lt;br /&gt;
&#039;&#039;&#039;and/or&#039;&#039;&#039;&lt;br /&gt;
*how to compile those versions &#039;&#039;&#039;with&#039;&#039;&#039; the [https://lists.secondlife.com/pipermail/sldev/2007-February/000545.html current llmozlib from ubrowser.com]&lt;br /&gt;
--[[User:Boroondas Gupte|Boroondas Gupte]] 06:10, 26 February 2007 (PST)&lt;br /&gt;
:I edited it so it&#039;s complete if you want llMozLib off, getting llMozlib compiled and working with the viewer is actually nontrivial, compiling llMozLib is just about as hard as compiling the viewer itself! [[User:Gigs Taggart|Gigs Taggart]] 08:06, 27 February 2007 (PST)&lt;br /&gt;
::What functionality is lost if you do not use llmozlib? [[User:Meyaden Beck|Meyaden Beck]] 20:11, 12 April 2007 (PDT)&lt;br /&gt;
:::You won&#039;t have any in-viewer browser windows (e.g. F1-Help) as well as no HTML login screen (you&#039;ll get the old login screen with the static picture instead). Opening pages in an external browser from within SL (e.g. links in chat/IM) won&#039;t be affected, nor will be inworld actions triggered by your external browser (e.g. SLUrl). --[[User:Boroondas Gupte|Boroondas Gupte]] 06:57, 7 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
=== mozjs ===&lt;br /&gt;
&lt;br /&gt;
A similar problem seems to be present with [[Source_archive#2007-Feb-27|beta-1.13.4.3]], only that it&#039;s &#039;&#039;&#039;-lmozjs&#039;&#039;&#039; not &#039;&#039;&#039;-lllmozlib&#039;&#039;&#039; that&#039;s failing at linktime. I can&#039;t even seem to locate the corresponding header file (expected filename &#039;mozjs.h&#039;) so it might well be that the problem only looks similar to the llmozlib one, but actually isn&#039;t. I&#039;ll post to the [sldev] list as soon as I have investigated this further. --[[User:Boroondas Gupte|Boroondas Gupte]] 11:22, 1 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
=== FMOD ===&lt;br /&gt;
&lt;br /&gt;
This non-open-source audio library is a continuous source of irritation to open-source devotees and 64-bit devotees alike (it only comes in 32-bit), so it needs early replacement.  But not replacement by another full-function audio subsystem.  A much better approach is available.&lt;br /&gt;
&lt;br /&gt;
Every platform has audio players available, or 20 of them, so why reinvent the wheel and bloat the client unnecessarily?  Write only a software mixer to combine the various audio sources together, and present the output at an Icecast-type stream listener interface on a local socket.  Then the local player of choice can connect to it just like to any Internet radio, and you&#039;re done.  You can even launch the player to make it seamless.&lt;br /&gt;
&lt;br /&gt;
I bet that this would make the client shrink enormously too!  And the icing on the cake is that the separate player will naturally run on another core on modern multicore machines. --[[User:Morgaine Dinova|Morgaine Dinova]] 18:03, 12 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Help? ==&lt;br /&gt;
&lt;br /&gt;
Would it be useful to add a blurb on where people can get help compiling, specifically in Linux. Or at least an internal link to another wiki page that has a list of places to get help in each version, MAC/WIN/LIN/BSD/(however far people want to break it down, etc.).&lt;br /&gt;
&lt;br /&gt;
== little helper script ==&lt;br /&gt;
&lt;br /&gt;
For those of you who don&#039;t want to copy-paste from this article for every build they compile, I put a little bash script I&#039;d liked to share in my user space: [[User:Boroondas_Gupte/unpack.sh]]. It just does a part of what&#039;s explained in this article. --[[User:Boroondas Gupte|Boroondas Gupte]] 09:59, 6 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Error? ==&lt;br /&gt;
&lt;br /&gt;
Under the heading &amp;quot;fix shell scripts&amp;quot; there is a header file listed. can someone else confirm this should not be in that list, and if it should, why does it not have a #!/bin/sh at the top of it?&lt;br /&gt;
&lt;br /&gt;
* linden/libraries/i686-linux/include/apr-1/arch/unix/apr_arch_threadproc.h&lt;br /&gt;
&lt;br /&gt;
== Required Headers ==&lt;br /&gt;
&lt;br /&gt;
Is there a reason that the instructions include copying header files to the source tree?&lt;br /&gt;
&lt;br /&gt;
I have not attempted the install yet, that will probably be in a few days for me.  However, most packages don&#039;t require the copying of header files from any standard lib into their own source directories.  I am not sure if this practice is really a good one.&lt;br /&gt;
&lt;br /&gt;
Will the package not compile if the headers are simply in their proper locations?  If so, this is something that the developers may want to consider fixing.  I would personally consider that a bug.&lt;br /&gt;
&lt;br /&gt;
Normal procedure with most apps is to have the librarries propperly installed, and have the code or makefile written so that it looks in the right place. [[User:Meyaden Beck|Meyaden Beck]] 19:41, 12 April 2007 (PDT)  (I forgot to sign before I think)&lt;br /&gt;
&lt;br /&gt;
Autoconf is a wonderful tool. :P&lt;br /&gt;
&lt;br /&gt;
:This setup is so that a fixed build of included libraries are setup for each branch and platform. The host platform can change independently of the SL build. Also, isolation of these libraries greatly reduce debug issues. There are a few patches to use the host platform&#039;s installed libraries instead. However, a few changes still need to be made for consistency. [[User:Dzonatas Sol|Dzonatas Sol]] 11:58, 12 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
::Hmmm...  I see, I think.  My next question (and if I get the time I may fix this one myself), why the choice to pretty much ignore compilation of llMozlib?  Stating that &amp;quot;Compiling it is a pain, and this is how you disable it&amp;quot;, doesn&#039;t look good.  I haven&#039;t gotten that far in my current Linux install yet.  I just finished installing XFce4, but as soon as I get OpenOffice.org and Blender installed, I will likely move on to Second Life.  When I do, I will go through the steps of compiling llMozlib and take notes on what I did to make it work. :-)  I should probablly also make sure to include a warning that I am using an LFS build.  However, the instructions the LFS site uses to build most packages should theoretically work for just about any system. ^_^[[User:Meyaden Beck|Meyaden Beck]] 19:41, 12 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Hmm.  I believe older versions of this page clearly showed instractions for those who just want to compile viewer only and for those who want to build everything.  I believe the older style is better.&lt;br /&gt;
&lt;br /&gt;
Are there anyone who objects to such reorganization?&lt;br /&gt;
&lt;br /&gt;
--[[User:Alissa Sabre|Alissa Sabre]] 22:51, 8 June 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
I agree to every kind of reorganization, since this page is a bit messy. We should provide a simplified version of it, at least. I think it&#039;s a bit scary for newbies. So today I moved the &#039;Packaging errors&#039; section to Common compilation problems page (we may want to give more visibility to that link); I removed the &#039;Fix Shell Scripts&#039; because I think it has been fixed; I added some questions where I think we need to being more informative; It looks like you only need to add FMOD=no to the scons command, and I think we should give this information only - i&#039;m not sure about this, so in the meantime I just made some changes to both &#039;Prerequisites&#039; and &#039;Copy headers and libraries into the source tree&#039; sections. &lt;br /&gt;
&lt;br /&gt;
Please reverse my changes if not appropriate! I&#039;m OK with a reorganization of this page. Pleae do a new page version for every edit, using proper comments, so revert is easier. &lt;br /&gt;
--[[User:Signore Iredell|Signore Iredell]] 06:42, 9 June 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note that gcc-3.4 is NOT required, patches to fix compiling on gcc 4.x were among the first to be merged after the source release. I&#039;ve been compiling with gcc 4.x from the beginning and it works fine. I&#039;m not sure how to rework the article though, SConstruct is hardwired to call g++-3.4 which won&#039;t even work with Fedora&#039;s compat compiler (which is named g++34), which does not seem to be mentioned in the article either. Please merge VWR-218 ;P [[User:Seg Baphomet|Seg Baphomet]] 12:39, 13 June 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Gentoo 64bits? ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
Did anyone get it compile on Gentoo 64bits? [[User:Iann Alderson|Iann Alderson]] 04:19, 7 October 2007 (PDT)&lt;br /&gt;
* Needed packages:&lt;br /&gt;
** dev-libs/boost&lt;br /&gt;
** dev-util/scons&lt;br /&gt;
** media-libs/gstreamer&lt;br /&gt;
&lt;br /&gt;
Ok, it compiles alright for well over an hour, which is better than I expected. ;o)&lt;br /&gt;
&lt;br /&gt;
But the, I get &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cc1plus: warnings being treated as errors&lt;br /&gt;
/tmp/yann/usr/local/src/linden/indra/i686-linux-client-release/newview/viewer.cpp: In function &#039;BOOL do_elfio_glibc_backtrace()&#039;:&lt;br /&gt;
/tmp/yann/usr/local/src/linden/indra/i686-linux-client-release/newview/viewer.cpp:2423: warning: format &#039;%d&#039; expects type &#039;int&#039;, but argument 3 has type &#039;size_t&#039;&lt;br /&gt;
scons: *** [/tmp/yann/usr/local/src/linden/indra/i686-linux-client-release/newview/viewer.o] Error 1&lt;br /&gt;
scons: building terminated because of errors.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Does anyone know what that means? Thanks, [[User:Iann Alderson|Iann Alderson]] 11:24, 7 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
It&#039;s been a while, but for completeness&#039;s sake: gcc lets one make the compiler very finicky, so that things that are normally just warnings are considered errors that will make the compile fail--that way you can fix more stuff at compile time, rather than leaving possible errors to barf at runtime. In this particular case, someone has a *printf() call that has a constant format string, so that the compiler can type check the corresponding arguments, and there&#039;s a %d (which is used to print int values) corresponding to a value of type size_t, which is typically unsigned, and for a 64-bit system may well be larger than int, which is likely to make printf fail to properly access any following values to be printed. --[[User:Melissa Yeuxdoux|Melissa Yeuxdoux]] 01:33, 31 December 2008 (UTC)&lt;br /&gt;
&lt;br /&gt;
http://pastebin.ca/729141&lt;br /&gt;
&lt;br /&gt;
== OpenAL ==&lt;br /&gt;
OpenAL should be listed under the &amp;quot;Installing the required libraries&amp;quot; section, right? libopenal-dev and libalut-dev -- [[User:Everclear Quandry|Everclear Quandry]] 02:58, 15 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== gnu/stubs-32.h : No such file or directory ==&lt;br /&gt;
&lt;br /&gt;
It seemed that on Ubuntu (at least) installing the package libstdc++6 add the library libstdc++.so.6.&lt;br /&gt;
&lt;br /&gt;
SL build requires a link libstdc++.so&lt;br /&gt;
&lt;br /&gt;
Typing this command fix the issue:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75936</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75936"/>
		<updated>2008-07-02T21:46:42Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* How to use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
&lt;br /&gt;
The command let you send Post data to PHP.&lt;br /&gt;
The format of the HTTP Post is however a bit tricky.&lt;br /&gt;
&lt;br /&gt;
With this library let you call a PHP page and post as many variables in your call as you want.&lt;br /&gt;
&lt;br /&gt;
On top of that I introduce a little checksum/password sytem to limit potential abuse.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 string SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      if (get_magic_quotes_gpc()) {&lt;br /&gt;
        // $name = stripslashes($name); not a good idea though &lt;br /&gt;
        $value = stripslashes($value);&lt;br /&gt;
        $_POST[$name]=$value;&lt;br /&gt;
      }&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75934</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75934"/>
		<updated>2008-07-02T21:44:08Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* How to use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
&lt;br /&gt;
The command let you send Post data to PHP.&lt;br /&gt;
The format of the HTTP Post is however a bit tricky.&lt;br /&gt;
&lt;br /&gt;
With this library let you call a PHP page and post as many variables in your call as you want.&lt;br /&gt;
&lt;br /&gt;
On top of that I introduce a little checksum/password sytem to limit potential abuse.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 string SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      if (get_magic_quotes_gpc()) {&lt;br /&gt;
        // $name = stripslashes($name); not a good idea though &lt;br /&gt;
        $value = stripslashes($value);&lt;br /&gt;
        $_POST[$_NAME]=$value;&lt;br /&gt;
      }&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=75919</id>
		<title>Category:LSL Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=75919"/>
		<updated>2008-07-02T21:25:22Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Support Script Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Multi-lang}}{{LSL Header}}{{RightToc}}&lt;br /&gt;
==Script Library==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em 0.5em 1.5em&amp;quot;&amp;gt;&lt;br /&gt;
Come to this page to see complex examples that show how to combine parts of LSL.&lt;br /&gt;
&lt;br /&gt;
Go to the [[:Category:LSL Examples|LSL Examples]] page to see brief examples of how to use parts of LSL &lt;br /&gt;
&lt;br /&gt;
Why collect complex examples here? Well, ...&lt;br /&gt;
&lt;br /&gt;
There are many [[script|scripts]] that have become buried in the [http://forums.secondlife.com/forumdisplay.php?f=15 Scripting Library forum], were lost with the death of the scripting forums, or sit idle in [[inventory|inventories]] that could be useful and should be more accessible.&lt;br /&gt;
&lt;br /&gt;
Other scripters may be in the same situation. This wiki is a well-suited medium for a script library. Feel free to add your scripts to the script library by creating new pages for them and linking to those pages here.&lt;br /&gt;
&lt;br /&gt;
Note that there are many more scripts in the LSL Library here, but you can&#039;t get to them if you don&#039;t know they exist, because they are subpages now, instead of an automatically updated category.  Good luck searching.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules for posting: ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
#Your script must be tested and working. If it&#039;s not, stick it in your user-space until it is. This is a list of working, usable scripts.&lt;br /&gt;
#Add a link to your script&#039;s page here. Link back to this page from your script&#039;s page. Start your page with &amp;lt;nowiki&amp;gt;{{LSL Header}}&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
#Do not add scripts that duplicate the same functionality as an existing script or built in {{LSLGC|Functions|function}}. If yours does, explain why.&lt;br /&gt;
#Do not list simple scripts here. Include those among the [[:Category:LSL Examples|LSL Examples]] instead.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
==LSL Script Library==&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||[[3D Radar]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Rezzes a ball for each avatar in range. Each ball tracks it&#039;s own AV and displays distance.&lt;br /&gt;
|-&lt;br /&gt;
||[[AntiDelay Node]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Uses llMessageLinked to stop those pesky delays.&lt;br /&gt;
|-&lt;br /&gt;
||[[AO Overriding Pose Ball]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||No more turning your AO off and on when you sit down&lt;br /&gt;
|-&lt;br /&gt;
||[[ARCFOUR Strong Encryption Implementation]]&lt;br /&gt;
||[[User:Nekow42 Zarf|Nekow42 Zarf]]&lt;br /&gt;
||An LSL implementation of ARCFOUR, the most popular stream cipher still in use. It is licensed under a Creative Commons Attribution 3.0 license.&lt;br /&gt;
|-&lt;br /&gt;
||[[Basic Encryption Modules]]&lt;br /&gt;
||[[User:Beverly Larkin|Beverly Larkin]]&lt;br /&gt;
||Basic encryption scripts, allows you to encrypt a float and shout it to another prim on a randomly chosen channel.&lt;br /&gt;
|-&lt;br /&gt;
||[[Binary Clock v1.1|Binary Clock]]&lt;br /&gt;
||[[User:Fox Diller|Fox Diller]]&lt;br /&gt;
||A Binary Clock.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||[[Builders Buddy|Builder&#039;s Buddy Tool]]&lt;br /&gt;
||[[User:Newfie Pendragon|Newfie Pendragon]]&lt;br /&gt;
||Script to easily move/rotate large builds that exceed the linkable size limit (30 meters).&lt;br /&gt;
|-&lt;br /&gt;
||[[Camera Sync]]&lt;br /&gt;
||[[User:Meyermagic Salome|Meyermagic Salome]] and [[User:Nomad Padar|Nomad Padar]]&lt;br /&gt;
||A system to synchronize the cameras of two avatars.&lt;br /&gt;
|-&lt;br /&gt;
||[[Chatbot]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Compile and run the LSL you type on a channel, faster than you can thru the 2007-08 SL GUI.&lt;br /&gt;
|-&lt;br /&gt;
||[[Chat Logger (GPL)]]&lt;br /&gt;
||[[User:Nobody Fugazi|Nobody Fugazi]]&lt;br /&gt;
||Chat logger which requests permission from participants before recording them.&lt;br /&gt;
|-&lt;br /&gt;
||[[Chat_Relay|Chat Relay]]&lt;br /&gt;
||[[User:grumble Loudon|grumble Loudon]]&lt;br /&gt;
||A Chat relay which can be routed using a path header and won&#039;t echo.&lt;br /&gt;
|-&lt;br /&gt;
||[[Code Racer]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Race two versions of code forever, to see which runs faster.&lt;br /&gt;
|-&lt;br /&gt;
||[[Code Sizer]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Count the bytes compiled from source code, to measure how to write small code.&lt;br /&gt;
|-&lt;br /&gt;
||[[Color conversion scripts|Color Conversion]]&lt;br /&gt;
||[[User:Sally LaSalle|Sally LaSalle]]&lt;br /&gt;
||Convert between Red Green Blue (RGB) and Hue Saturation Value (HSV).&lt;br /&gt;
|-&lt;br /&gt;
||[[Library Combined Library|Combined Library]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Library of mostly encoding and decoding functions, some more useful then others.&lt;br /&gt;
* String functions: Replace / Trim right / Trim left / Trim both&lt;br /&gt;
* Unicode conversion: UTF8 to Unicode / Unicode to UTF8&lt;br /&gt;
* List functions: Replace / Compare&lt;br /&gt;
|-&lt;br /&gt;
||[[Computer:jaycoonlanguage]]&lt;br /&gt;
||[[User:jayco121 Bing|jayco121 Bing]]&lt;br /&gt;
|| A language written in LSL that is meant for my computer (available at the shop).&lt;br /&gt;
|-&lt;br /&gt;
||[[Library_Chat_Relay|Conversation Relay]]&lt;br /&gt;
||[[User:Jippen Faddoul|Jippen Faddoul]]&lt;br /&gt;
||Chat relay which requests permission from participants before relaying their messages. Also includes their attachments. (ToS compliant).&lt;br /&gt;
|-&lt;br /&gt;
||[[Curtain script]]&lt;br /&gt;
||[[User:Zilla Larsson|Zilla Larsson]]&lt;br /&gt;
||A simple script to retract/stretch curtains, blinds, bedcovers and more&lt;br /&gt;
|-&lt;br /&gt;
||[[Dataserver API]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Dataserver Framework for Notecards.&lt;br /&gt;
|-&lt;br /&gt;
||[[Date Library]]&lt;br /&gt;
||[[User:Corto Maltese|Corto Maltese]]&lt;br /&gt;
|| Date library, based on number of day since march 3rd 1600, can be used to calculate weekday, date differences, and date offset, and date formating.&lt;br /&gt;
|-&lt;br /&gt;
||[[Day of the Week]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Function to get day of the week from [[llGetUnixTime]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Deed Tools]]&lt;br /&gt;
||[[User:Falados Kapuskas|Falados Kapuskas]]&lt;br /&gt;
||Tools that allow the creator to modify Group-Owned (Deeded) Objects via chat.&lt;br /&gt;
|-&lt;br /&gt;
||[[Describe Chatter]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Chat to see yourself as others do.&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog Control]]&lt;br /&gt;
||[[User:Nargus Asturias|Nargus Asturias]]&lt;br /&gt;
|| A (not-so) simple dialog control script. Call dialog and receive selected value via link_message(), with built-in timer and link_message() notification on time out. Supports multi-pages dialog and numeric property dialog. Button text and dialog&#039;s returned value can differ.&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog Menus Control]]&lt;br /&gt;
||[[User:Nargus Asturias|Nargus Asturias]]&lt;br /&gt;
|| An extension to Nargus Dialog Control. This menus control allow multi-level menus through SL dialog system. It can also recall last used menus. Menus are saved and pre-formatted for faster access. Though it is not the fastest, nor most memory efficient, but it should make it easier to use.&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog NumberPad|Dialog Number Pad]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Use a dialog to accept positive integer input from users.&lt;br /&gt;
|-&lt;br /&gt;
||[[Efficiency Tester]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Tests the speed of a function.&lt;br /&gt;
|-&lt;br /&gt;
||[[Email-to-IM|Email2IM]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Send IMs to SL friends via email (translate emails from friends into IMs).&lt;br /&gt;
|-&lt;br /&gt;
||[[Fix Small Prims|Fix_Small_Prims]]&lt;br /&gt;
||[[User:Emma Nowhere|Emma Nowhere]]&lt;br /&gt;
||Finds and adjusts the smallest prims in a linkset so that it can be scaled down further.&lt;br /&gt;
|-&lt;br /&gt;
||[[Float2Hex]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Very useful for transporting [[float|floats]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Follower (script)|Follower]]&lt;br /&gt;
||Unknown, uploaded by [[User:Slik Swindlehurst|Slik Swindlehurst]]&lt;br /&gt;
||Makes an object follow the nearest person. Do not use for [[grief|griefing]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Geometric|Geometric Library]]&lt;br /&gt;
||[[User:Nexii_Malthus|Nexii Malthus]]&lt;br /&gt;
||A substantial amount of various geometric functions for intersection and other purposes of 3D maths.&lt;br /&gt;
|-&lt;br /&gt;
||[[GetTimestampOffset]]&lt;br /&gt;
||[[User:Siann_Beck|Siann Beck]]&lt;br /&gt;
||Returns llGetTimestamp() with an hour offset.&lt;br /&gt;
|-&lt;br /&gt;
||[[Give InvItem every n hours]]&lt;br /&gt;
||[[User:Criz Collins|Criz Collins]]&lt;br /&gt;
||Will give an inventory item on touch only every n hours, even if somebody touches the object more than once. &lt;br /&gt;
|-&lt;br /&gt;
||[[Google Charts]]&lt;br /&gt;
||[[User:Dedric Mauriac|Dedric Mauriac]]&lt;br /&gt;
||Create links to display raw data as a chart image.&lt;br /&gt;
|-&lt;br /&gt;
||[[Group Privacy]]&lt;br /&gt;
||[[User:Chance Unknown|Chance Unknown]]&lt;br /&gt;
||Security device to insure members of a group can have a private area. Deactivates when nobody present.&lt;br /&gt;
|-&lt;br /&gt;
||[[Hello Avatar]]&lt;br /&gt;
||Linden Lab&lt;br /&gt;
||SL&#039;s default script.&lt;br /&gt;
|-&lt;br /&gt;
||[[High Altitude Rezzer|High Altitude Rezzer]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Vehicle that goes straight up and then rezzes objects up to 4,096 meters.&lt;br /&gt;
|-&lt;br /&gt;
||[[Holodeck]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Home Rezzing System (Open Source).&lt;br /&gt;
|-&lt;br /&gt;
||[[Intra-Region Update Server]]&lt;br /&gt;
||[[User:Emma_Nowhere|Emma Nowhere]]&lt;br /&gt;
||Centrally update objects such as Freeview screens or teleport pads within a region that are configured by notecards or contain modifiable objects or media assets.&lt;br /&gt;
|-&lt;br /&gt;
||[[Interpolation|Interpolation Library]]&lt;br /&gt;
||[[User:Nexii_Malthus|Nexii Malthus]]&lt;br /&gt;
||A small set of interpolation functions.&lt;br /&gt;
|-&lt;br /&gt;
||[[Inventory Menu]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Inventory Based Menu System.&lt;br /&gt;
|-&lt;br /&gt;
||[[iTunes RPC Email|iTunes RPC]]&lt;br /&gt;
||[[User:Fox Diller|Fox Diller]]&lt;br /&gt;
||iTunes RPC via LSL [[llEmail]] and [[llRemoteDataReply]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Key Pad Door|Keypad Door]]&lt;br /&gt;
||[[User:Tdub Dowler|Tdub Dowler]]&lt;br /&gt;
|| Door and keypad with changeable code. Follow instructions carefully!&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_languageAPI]]&lt;br /&gt;
||[[User:Gypsy paz|Gypsy Paz]]&lt;br /&gt;
||Multi-lingual API from notecard based language files&lt;br /&gt;
|-&lt;br /&gt;
||[[Last Sound System]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||An LSL Last.fm client.&lt;br /&gt;
|-&lt;br /&gt;
||[[Mandelbrot Explorer]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||An interactive fractal explorer.&lt;br /&gt;
|-&lt;br /&gt;
||[[Merge Sort]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Implements a Merge Sort in LSL, however this code is 300(ish) times slower than [[llListSort]]. Don&#039;t use this in a script!&lt;br /&gt;
|-&lt;br /&gt;
||[[Minesweeper]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||A simple minesweeper game.&lt;br /&gt;
|-&lt;br /&gt;
||[[Multirezzer|Multirezzer (on collision)]]&lt;br /&gt;
||[[User:Beet Streeter|Beet Streeter]]&lt;br /&gt;
||Spawns up to 10 objects when the object containing the script collides with a user.&lt;br /&gt;
|-&lt;br /&gt;
||[[Object to Data v1.2|Object to Data]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Turns an object into text (and back). Allows people to transfer objects through notecards.&lt;br /&gt;
|-&lt;br /&gt;
||[[ParseString2List]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Same as [[llParseString2List]] and [[llParseStringKeepNulls]], but not limited to 8 spacers or separators. Thus substitute a call to the [[llParseString2List]] and [[llParseStringKeepNulls]] functions by a call to [[Parse_String_To_List|ParseString2List]] whenever you have more than 8 separators or more than 8 spacers.&lt;br /&gt;
|-&lt;br /&gt;
||[[Pathfinder]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||A potential field based pathfinding library.&lt;br /&gt;
|-&lt;br /&gt;
||[[Phantom Maker]]&lt;br /&gt;
||[[User:Xaviar_Czervik|Xaviar Czervik]]&lt;br /&gt;
||An object that turns avatars into phantoms, without having to remain sitting.&lt;br /&gt;
|-&lt;br /&gt;
||[[Prefix Calculator]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
|| A calculator that evaluates expressions in prefix notation. &lt;br /&gt;
&amp;lt;code&amp;gt;+ 3 4 = 5. * + 1 2 + 3 4 = 14.&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||[[Pseudo-random Number Generator]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Generates a Pseudo-random number between -0x7FFFFFFF and 0x7FFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
||[[Random AV Profile Projector]]&lt;br /&gt;
||[[User:Debbie Trilling|Debbie Trilling]]&lt;br /&gt;
||Randomly selects an AV from a crowd &amp;amp; then projects their profile picture as a &#039;holographic&#039; image &lt;br /&gt;
|-&lt;br /&gt;
||[[Say Region Frames Per Second|Region Frames Per Second]]&lt;br /&gt;
||[[User:Heymeriou Mystakidou|Heymariou Mystakidou]]&lt;br /&gt;
|| Says the region name and frames per second out loud on command.&lt;br /&gt;
|-&lt;br /&gt;
||[[Script Override Functions]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||bypass default strings, integer etc in chat channel.&lt;br /&gt;
|-&lt;br /&gt;
||[[Self Upgrading Script Enhanced]]&lt;br /&gt;
||[[User:Cron Stardust|Cron Stardust]]&lt;br /&gt;
||Keeps only latest version of the script on prim (even with multiple adds of the same script!)&lt;br /&gt;
|-&lt;br /&gt;
||[[SHA1|SHA1 Hash]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Preforms a SHA1 Hash on an input text. Similar to MD5 only (slightly) more secure.&lt;br /&gt;
|-&lt;br /&gt;
||[[SLateIt]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||An augmented virtual reality HUD.&lt;br /&gt;
|-&lt;br /&gt;
||[[SLetanque]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||An LSL petanque game.&lt;br /&gt;
|-&lt;br /&gt;
||[[SL Mail V1.2]]&lt;br /&gt;
||[[User:Flennan Roffo|Flennan Roffo]]&lt;br /&gt;
||Second Life mail client V1.2 (released sept&#039;07). Send and receive mail from within Second Life from and to any address. With Address Book function and many chat commands. V1.3 is upcoming soon! &lt;br /&gt;
|-&lt;br /&gt;
||[[SL_NTPoHTTP_v1.1_client|SL NTPoHTTP client]]&lt;br /&gt;
|[[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
||Second Life Needs Time Parsing over Hyper Text Transfer Protocol&lt;br /&gt;
Emulates the function of [[llGetWallclock]] for any timezone by using SLOpenID&#039;s SLNTPoHTTP service. Also supports ISO 8601 and RFC 2822 timestamps. Script is dependent upon an external service operated by the author!&lt;br /&gt;
|-&lt;br /&gt;
||[[Spiral Staircase Generator]]&lt;br /&gt;
|[[User:Meyermagic Salome|Meyermagic Salome]]&lt;br /&gt;
||Generates nice looking spiral staircases without much hassle.&lt;br /&gt;
|-&lt;br /&gt;
||[[String Compare]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Compares two strings and reliably returns either 1, -1, or 0 if they are the same.&lt;br /&gt;
|-&lt;br /&gt;
||[[Teleport HUD]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||WORKS TO 4096 METERS!! Very user friendly teleport HUD. Add destinations by touching &amp;quot;Add&amp;quot; &amp;amp; naming destination in chat. Automatically gets sim name and coordinates. Will only display the destinations in the sim you are currently in. Demonstrates more advanced list manipulation and stride functions.&lt;br /&gt;
|-&lt;br /&gt;
||[[Texture Menu Management|Texture Management]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Dialog Menu based Texture Selection.&lt;br /&gt;
|-&lt;br /&gt;
||[[Tic Tac Toe]]&lt;br /&gt;
||[[User:CG Linden|CG Linden]]&lt;br /&gt;
||Step by step demo on how to implement a larger scripting project&lt;br /&gt;
|-&lt;br /&gt;
||[[TightList]]&lt;br /&gt;
||[[User:Strife Onizuka|Revolution Perenti]]&lt;br /&gt;
||Tight List is a family of functions for encoding lists as strings and then decoding them back into lists. &lt;br /&gt;
&lt;br /&gt;
There are two flavors: TightList and TightListType. TightListType preserves types and uses a 6 char header, while TightList uses a 1 char header that doesn&#039;t preserve type. &lt;br /&gt;
|-&lt;br /&gt;
||[[Timer Module]]&lt;br /&gt;
||[[User:Isabelle Aquitaine|Isabelle Aquitaine]]&lt;br /&gt;
||Manage multiple timers via linked messages.&lt;br /&gt;
|-&lt;br /&gt;
||[[Unix2DateTime]]&lt;br /&gt;
|[[User:Flennan Roffo|Flennan Roffo]]&lt;br /&gt;
||Conversion from Unix time (llGetUnixTime()) to date and time string and vice versa.&lt;br /&gt;
|-&lt;br /&gt;
||[[Under Age Boot]]&lt;br /&gt;
|[[User:Chance Unknown|Chance Unknown]]&lt;br /&gt;
||Security device example to teleport home accounts below a minimum age limit; can be useful in combating free griefer accounts.&lt;br /&gt;
|-&lt;br /&gt;
||[[Visitor Logger (Web/Basic) ]]&lt;br /&gt;
|[[User:Buddy Sprocket|Buddy Sprocket]]&lt;br /&gt;
||A very basic visitor logger - log visitors in SL to a text file on your web-site.&lt;br /&gt;
|-&lt;br /&gt;
||[[Vote Simple]]&lt;br /&gt;
|[[User:JB_Kraft|JB Kraft]]&lt;br /&gt;
||Simple vote collector. One avi, one vote.&lt;br /&gt;
|-&lt;br /&gt;
||[[WarpPos]]&lt;br /&gt;
|[[User:Keknehv Psaltery|Keknehv Psaltery]]&lt;br /&gt;
||Non-physical movement without the 10m limit.&lt;br /&gt;
|-&lt;br /&gt;
||[[XTEA Strong Encryption Implementation]]&lt;br /&gt;
||[[User:Morse Dillon|Morse Dillon]]&lt;br /&gt;
||An LSL implementation of XTEA (eXtended Tiny Encryption Algorithm).  This is the first known public release of a &#039;real&#039; strong encryption implementation in LSL and is released under the GNU General Public License (GPL).&lt;br /&gt;
|-&lt;br /&gt;
||[[XyText 1.5|XyText]]&lt;br /&gt;
||[[User:Xylor Baysklef|Xylor Baysklef]]&lt;br /&gt;
|| Display text (up to 10 characters) on a prim. Use as many prims as desired.&lt;br /&gt;
|-&lt;br /&gt;
||[[XyyyyzText|XyyyyzText]]&lt;br /&gt;
||[[User:Criz Collins|Criz Collins]]&lt;br /&gt;
|| Display text (up to 10 characters) on a prim. Displays different text for each line instead of one single text, that will be broken into the next lines. Watch here for what that means: http://screencast.com/t/1wMLujLcEO&lt;br /&gt;
|-&lt;br /&gt;
||[[XyzzyText|XyzzyText]]&lt;br /&gt;
||[[User:Thraxis Epsilon|Thraxis Epsilon]] and [[User:Gigs Taggart|Gigs Taggart]]&lt;br /&gt;
|| Display text (up to 10 characters) on a prim. Way more efficient than XyText.&lt;br /&gt;
|-&lt;br /&gt;
||[[Zero Lag Poseball]]&lt;br /&gt;
||[[User:Jippen Faddoul|Jippen Faddoul]]&lt;br /&gt;
||A simple poseball with no lag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Support Script Library==&lt;br /&gt;
These are scripts in other languages, intended to be run on other systems that support scripts written in LSL&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||[[HTTP Post request to a PHP server]]&lt;br /&gt;
||[[User:Corto Maltese|Corto Maltese]]&lt;br /&gt;
|| This small library allows you to make simple POST requests to your website. The libraries allow you to get your request through the variable $_POST on the server. It also include a basic security mechanism aimed to stop hacking. Comprises of LSL client script and PHP server script.&lt;br /&gt;
|-&lt;br /&gt;
|| Silo&lt;br /&gt;
|| [[User:Zero_Linden|Zero Linden]]&lt;br /&gt;
|| General purpose data store in PHP.  Use this to persist arbitrary data from LSL via [[llHTTPRequest]].  See:&lt;br /&gt;
* [http://www.notabene-sl.com/misc/silo-README.txt README] file&lt;br /&gt;
* [http://www.notabene-sl.com/misc/silo.tgz silo.tgz] tarball&lt;br /&gt;
* forum post [http://forums.secondlife.com/showthread.php?t=119570 Announcement].&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:SignpostMarv Martin/PHP/llXorBase64StringsCorrect|llXorBase64StringsCorrect]]&lt;br /&gt;
|| [[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
|| An implementation of [[llXorBase64StringsCorrect]] in PHP- should be useful if you&#039;re using llXorBase64StringsCorrect to do cryptography work in LSL2 and posting it out to the web via [[llHTTPRequest]].&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:SignpostMarv Martin/PHP/lsl fu.php|lsl_fu.php]]&lt;br /&gt;
|| [[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
|| A basic OOP&#039;d PHP Class containing VeloxSeverine&#039;s $_POST fixer and Marv&#039;s own eccentric ideas for &amp;quot;fixing&amp;quot; things.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Articles&#039;&#039;&#039;&lt;br /&gt;
*[[:Category:LSL Examples| Examples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Library/fr&amp;diff=75917</id>
		<title>LSL Library/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Library/fr&amp;diff=75917"/>
		<updated>2008-07-02T21:21:13Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Bibliothèque de scripts compatibles avec le LSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header/fr}}{{RightToc}}&lt;br /&gt;
== Bibliothèque de scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em 0.5em 1.5em&amp;quot;&amp;gt;&lt;br /&gt;
Cette page permet de consulter des exemples complexes d‘application du LSL &lt;br /&gt;
&lt;br /&gt;
Consultez la page des [[:Category:LSL Examples/fr|exemples]] si vous recherchez des exemples simples d’application du LSL. &lt;br /&gt;
&lt;br /&gt;
Beaucoup de [[script/fr|scripts]] ont été perdus au fil du temps  que ce soit dans un forum [http://forums.secondlife.com/forumdisplay.php?f=15 Scripting Library forum] ou au fond d’un [[inventory/fr|inventaire]] alors qu’ils auraient pu être beaucoup plus utiles s’ils avaient été diffusés plus largement.&lt;br /&gt;
&lt;br /&gt;
Le wiki est un outil adapté à la création d’une bibliothèque de scripts. N’hésitez pas à créer des pages pour ajouter vos propres scripts et à insérer votre lien ici.&lt;br /&gt;
&lt;br /&gt;
Il existe bien plus d’exemples de scripts que ceux référencés ici, mais ils sont moins facilement accessibles car non référencés. &lt;br /&gt;
&lt;br /&gt;
Bonne chance dans vos recherches !&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Règles à respecter pour poster: ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
#Votre script doit être testé (et fonctionner) avant d’être posté. Si ce n’est pas le cas, placez le dans votre espace personnel jusqu’a ce qu’il soit prêt. Cette liste ne propose que des scripts opérationnels.&lt;br /&gt;
#Ajoutez un lien ci-dessous et  renvoyez un lien de cette page depuis votre page. Débutez votre page avec la balise &amp;lt;nowiki&amp;gt;{{LSL Header}}&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
#N’ajoutez pas un script qui dupliquerait la fonctionnalité d’un script existant dans cette bibliothèque ou dans la fiche d’une {{LSLGC|Functions|fonction}}. Si vous souhaitez le faire malgré tout, expliquez pourquoi.&lt;br /&gt;
#N’ajoutez pas de script « simple » dans cette page, mais utilisez plutôt la catégorie  [[:Category:LSL Examples/fr|Exemples en LSL]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
==Bibliothèque de Scripts ==&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable/fr}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Nom&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Créateur&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||[[3D Radar]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Rezz une balle pour chaque avatar à proximité. Chaque balle espionnera son avatar et affichera sa distance. &lt;br /&gt;
|-&lt;br /&gt;
||[[AntiDelay Node]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Utilisation de llMessageLinked pour réduire l’impact du délai appliqué à certaines fonctions.&lt;br /&gt;
|-&lt;br /&gt;
||[[AO Overriding Pose Ball]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Plus besoin d’éteindre votre AO pour vous asseoir.&lt;br /&gt;
|-&lt;br /&gt;
||[[Basic Encryption Modules]]&lt;br /&gt;
||[[User:Beverly Larkin|Beverly Larkin]]&lt;br /&gt;
||Script basique de cryptage d’un float capable d’envoyer la donnée sur un canal choisi aléatoirement&lt;br /&gt;
|-&lt;br /&gt;
||[[Binary Clock v1.1|Binary Clock]]&lt;br /&gt;
||[[User:Fox Diller|Fox Diller]]&lt;br /&gt;
||Une horloge binaire.&lt;br /&gt;
|-&lt;br /&gt;
||[[Builders Buddy|Builder&#039;s Buddy Tool]]&lt;br /&gt;
||[[User:Newfie Pendragon|Newfie Pendragon]]&lt;br /&gt;
||Script pour facilement déplacer/tourner de grands bâtiments dépassant la limite de taille des objets liables (30 mètres)&lt;br /&gt;
|-&lt;br /&gt;
||[[Camera Sync]]&lt;br /&gt;
||[[User:Meyermagic Salome|Meyermagic Salome]] and [[User:Nomad Padar|Nomad Padar]]&lt;br /&gt;
||Un script pour synchroniser les caméras de deux avatars.&lt;br /&gt;
|-&lt;br /&gt;
||[[Chatbot]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Compile et lance le LSL tapé dans  le chat (plus rapide que l’interface du 2007-08).&lt;br /&gt;
|-&lt;br /&gt;
||[[Chat Logger (GPL)]]&lt;br /&gt;
||[[User:Nobody Fugazi|Nobody Fugazi]]&lt;br /&gt;
||Un enregistreur de chat qui demande la permission des participants avant de les enregistrer.&lt;br /&gt;
|-&lt;br /&gt;
||[[Chat_Relay|Chat Relay]]&lt;br /&gt;
||[[User:grumble Loudon|grumble Loudon]]&lt;br /&gt;
||Un système de relais de chat avec en-tête&lt;br /&gt;
|-&lt;br /&gt;
||[[Code Racer]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Fait tourner éternellement deux versions d’un code afin de déterminer laquelle est la plus rapide.&lt;br /&gt;
|-&lt;br /&gt;
||[[Code Sizer]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Compte le nombre de bytes compilés à partir d’un code source afin de mesurer l e codage optimal.&lt;br /&gt;
|-&lt;br /&gt;
||[[Color conversion scripts|Color Conversion]]&lt;br /&gt;
||[[User:Sally LaSalle|Sally LaSalle]]&lt;br /&gt;
||Effectue la conversion entre les codes « rouge, vert, bleu » (RVB /RGB) et le code « Hue Saturation Value » (HSV).&lt;br /&gt;
|-&lt;br /&gt;
||[[Library Combined Library|Combined Library]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Un bibliothèque de fonctions de codage et de décodage:&lt;br /&gt;
* Analyse de string : Remplacement / suppression droite / suppression gauche / suppression des deux cotés&lt;br /&gt;
* Conversion Unicode: UTF8 =&amp;gt; Unicode / Unicode to UTF8&lt;br /&gt;
* Analyse de lists : Remplacement / Comparaison&lt;br /&gt;
|-&lt;br /&gt;
||[[Computer:jaycoonlanguage]]&lt;br /&gt;
||[[User:jayco121 Bing|jayco121 Bing]]&lt;br /&gt;
||Un langage écrit an LSL adapté à mon ordinateur (disponible au magasin).&lt;br /&gt;
|-&lt;br /&gt;
||[[Library_Chat_Relay|Conversation Relay]]&lt;br /&gt;
||[[User:Jippen Faddoul|Jippen Faddoul]]&lt;br /&gt;
||Un système de relais de chat qui demande le droit au participant de transmettre leur message et leur pièce jointe (conforme à la ToS).&lt;br /&gt;
|-&lt;br /&gt;
||[[Dataserver API]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Outil de gestion de notes pour configurer  un script.&lt;br /&gt;
|-&lt;br /&gt;
||[[Date Library]]&lt;br /&gt;
||[[User:Corto Maltese|Corto Maltese]]&lt;br /&gt;
||Fonction de gestion des dates basée sur le nombre de jours depuis le 3 mars 1600. Ce script peut être utilisé pour calculer le numéro de semaine, les différences entre dates, le décalage et le format des dates.&lt;br /&gt;
|-&lt;br /&gt;
||[[Day of the Week]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Fonction permettant d’obtenir le jour de la semaine à partir de [[llGetUnixTime/fr|llGetUnixTime]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Describe Chatter]]&lt;br /&gt;
||Anonymous&lt;br /&gt;
||Chat pour se voir comme les autres nous voient&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog Control]]&lt;br /&gt;
||[[User:Nargus Asturias|Nargus Asturias]]&lt;br /&gt;
|| Un script de gestion de boîtes de dialogues. Il permet d’ouvrir des boîtes de dialogue et d’en transmettre les valeurs au travers de link_message() avec timer intégré. Ce script est capable de gérer les boîtes de dialogue réparties en plusieurs pages, il est également capable d’assurer une codification entre la valeur visible dans la boîte et la donnée renvoyée par le script.&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog Menus Control]]&lt;br /&gt;
||[[User:Nargus Asturias|Nargus Asturias]]&lt;br /&gt;
|| Une extension du script de gestion des boîtes de dialogue de Nargus. Il ajoute une gestion de menus et de sous menus, ainsi que des options de navigation inter menus. Les menus sont enregistrés et pré formatés afin d’y avoir accès plus rapidement (ce n’est pas la méthode la plus rapide, mais elle devrait rendre le script plus efficace)&lt;br /&gt;
|-&lt;br /&gt;
||[[Dialog NumberPad|Dialog Number Pad]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Utilise une boîte de dialogue pour la saisie d’integer par un utilisateur.&lt;br /&gt;
|-&lt;br /&gt;
||[[Efficiency Tester]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Teste la vitesse d’exécution d’une fonction.&lt;br /&gt;
|-&lt;br /&gt;
||[[Email-to-IM|Email2IM]]&lt;br /&gt;
||[[User:DoteDote Edison|DoteDote Edison]]&lt;br /&gt;
||Envoie des IM à des amis SL via e-mail.  (Transforme des emails en IM)&lt;br /&gt;
|-&lt;br /&gt;
||[[Fix Small Prims|Fix_Small_Prims]]&lt;br /&gt;
||[[User:Emma Nowhere|Emma Nowhere]]&lt;br /&gt;
||Trouve est ajuste la plus petite prim d’un objet de façon à ce qu’il puisse être réduit davantage.&lt;br /&gt;
|-&lt;br /&gt;
||[[Float2Hex]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Très utile pour transférer des [[float/fr|floats]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Follower (script)|Follower]]&lt;br /&gt;
||Unknown, uploaded by [[User:Slik Swindlehurst|Slik Swindlehurst]]&lt;br /&gt;
||Fait en sorte qu’un objet suive la personne la plus proche. A ne pas utiliser pour  gêner/embêter.&lt;br /&gt;
|-&lt;br /&gt;
||[[Google Charts]]&lt;br /&gt;
||[[User:Dedric Mauriac|Dedric Mauriac]]&lt;br /&gt;
||Crée des liens pour afficher des données brutes dans un diagramme.&lt;br /&gt;
|-&lt;br /&gt;
||[[Group Privacy]]&lt;br /&gt;
||[[User:Chance Unknown|Chance Unknown]]&lt;br /&gt;
||Système de sécurité destiné à garantir aux membres d’un groupe une zone privée. Désactivé quand personne n’est présent. &lt;br /&gt;
|-&lt;br /&gt;
||[[Hello Avatar]]&lt;br /&gt;
||Linden Lab&lt;br /&gt;
||Le script par défaut de Linden Lab.&lt;br /&gt;
|-&lt;br /&gt;
||[[High Altitude Rezzer|High Altitude Rezzer]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Véhicule s’élevant à la verticale et rezzant des objets jusqu&#039;à 4,096 mètres.&lt;br /&gt;
|-&lt;br /&gt;
||[[Holodeck]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
|Application du concept de l’Holodeck (cf. Open Source).&lt;br /&gt;
|-&lt;br /&gt;
||[[Intra-Region Update Server]]&lt;br /&gt;
||[[User:Emma_Nowhere|Emma Nowhere]]&lt;br /&gt;
||Mise à jour centralisée d’objets configurés par notes (ou contenant des objets modifiables et présents dans la même région.)&lt;br /&gt;
|-&lt;br /&gt;
||[[Inventory Menu]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Gestion de l’inventaire par menus.&lt;br /&gt;
|-&lt;br /&gt;
||[[iTunes RPC Email|iTunes RPC]]&lt;br /&gt;
||[[User:Fox Diller|Fox Diller]]&lt;br /&gt;
||Utilisation de iTunes RPC avec les [[llEmail/fr|llEmail]] et la fonction [[llRemoteDataReply/fr|llRemoteDataReply]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Key Pad Door|Keypad Door]]&lt;br /&gt;
||[[User:Tdub Dowler|Tdub Dowler]]&lt;br /&gt;
||Porte codée de couleur paramétrable. Suivez les consignes attentivement.&lt;br /&gt;
|-&lt;br /&gt;
||[[Last Sound System]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||Un client radio FM pour SL.&lt;br /&gt;
|-&lt;br /&gt;
||[[Merge Sort]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Implémentation d’un tri par fusion dans LSL, Ce code est 300x plus lent que [[llListSort/fr|llListSort]]. Ne l’utilisez pas dans un script!&lt;br /&gt;
|-&lt;br /&gt;
||[[Minesweeper]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Implémentation d’un démineur dans SL.&lt;br /&gt;
|-&lt;br /&gt;
||[[Multirezzer|Multirezzer (on collision)]]&lt;br /&gt;
||[[User:Beet Streeter|Beet Streeter]]&lt;br /&gt;
||Rez jusqu&#039;à 10 objets lorsque l’objet entre en collision avec l’utilisateur.&lt;br /&gt;
|-&lt;br /&gt;
||[[Object to Data v1.1|Object to Data]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Transforme un objet en texte, permet le transfert d’objets sous forme de notes.&lt;br /&gt;
|-&lt;br /&gt;
||[[ParseString2List]]&lt;br /&gt;
||[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
||Identique à [[llParseString2List/fr|llParseString2List]] et [[llParseStringKeepNulls/fr|llParseStringKeepNulls]],  mais n’est pas limité à 8 séparateurs ou espaces Il peut se substituer à [[llParseString2List/fr|llParseString2List]] et [[llParseStringKeepNulls/fr|llParseStringKeepNulls]] en appellant [[Parse_String_To_List|ParseString2List]].&lt;br /&gt;
|-&lt;br /&gt;
||[[Pathfinder]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||Un script qui propose des fonctions de calcul de chemins.&lt;br /&gt;
|-&lt;br /&gt;
||[[Prefix Calculator]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
|| Un calculateur qui travaille en notation « préfixée ». &lt;br /&gt;
&amp;lt;code&amp;gt;+ 3 4 = 5. * + 1 2 + 3 4 = 14.&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
||[[Pseudo-random Number Generator]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Génère un nombre pseudo aléatoire entre -0x7FFFFFFF et 0x7FFFFFFF&lt;br /&gt;
|-&lt;br /&gt;
||[[Random AV Profile Projector]]&lt;br /&gt;
||[[User:Debbie Trilling|Debbie Trilling]]&lt;br /&gt;
||Sélectionne de manière aléatoire un avatar dans une foule et projette l’image de son profil sur une image holographique. &lt;br /&gt;
|-&lt;br /&gt;
||[[Say Region Frames Per Second|Region Frames Per Second]]&lt;br /&gt;
||[[User:Heymeriou Mystakidou|Heymariou Mystakidou]]&lt;br /&gt;
||Renvoie le nom d’une région ainsi que le nombre de frames/secondes.&lt;br /&gt;
|-&lt;br /&gt;
||[[Script Override Functions]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Remplace les canaux par défaut de SL.&lt;br /&gt;
|-&lt;br /&gt;
||[[Self Upgrading Script Enhanced]]&lt;br /&gt;
||[[User:Cron Stardust|Cron Stardust]]&lt;br /&gt;
||Ne garde que la dernière version du script dans une prim. (Fonctionne également avec des doublons du script !)&lt;br /&gt;
|-&lt;br /&gt;
||[[SHA1|SHA1 Hash]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Applique sur un texte un cryptage de type SHA1. Similaire au MD5 mais un (petit) peu plus sécurisé.&lt;br /&gt;
|-&lt;br /&gt;
||[[SLateIt]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||Un Hud optimisé pour la réalité virtuelle.&lt;br /&gt;
|-&lt;br /&gt;
||[[SLetanque]]&lt;br /&gt;
||[[User:Babbage Linden|Babbage Linden]]&lt;br /&gt;
||Un jeu de pétanque en LSL&lt;br /&gt;
|-&lt;br /&gt;
||[[SL Mail V1.2]]&lt;br /&gt;
||[[User:Flennan Roffo|Flennan Roffo]]&lt;br /&gt;
||Un client mail en LSL V1.2 (sept&#039;07). Envoie et reçoit des mails depuis Second Life depuis et vers n’importe quelle adresse. Avec un carnet d’adresse et plusieurs fonctions depuis le chat. V1.3 bientôt disponible ! &lt;br /&gt;
|-&lt;br /&gt;
||[[SL_NTPoHTTP_v1.1_client|SL NTPoHTTP client]]&lt;br /&gt;
|[[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
||Second Life Needs Time Parsing over Hyper Text Transfer Protocol&lt;br /&gt;
Simule la fonction [[llGetWallclock]] pour n&#039;importe quel fuseau horaire en se basant sur le service SLNTPoHTTP de SLOpenID. Supporte aussi les &amp;quot;timestamps&amp;quot; ISO 8601 et RFC 2822. Le script utilise d&#039;un service externe mis en place par son auteur!&lt;br /&gt;
|-&lt;br /&gt;
||[[String Compare]]&lt;br /&gt;
||[[User:Xaviar Czervik|Xaviar Czervik]]&lt;br /&gt;
||Compare deux strings et renvoie 1, -1, or 0 en fonction du résultat.&lt;br /&gt;
|-&lt;br /&gt;
||[[Teleport HUD]]&lt;br /&gt;
||[[User:Jesse Barnett|Jesse Barnett]]&lt;br /&gt;
||Un Hud très utile de gestion de la téléportation. Ajoute une destination en cliquant sur « Add »  et en nommant la destination dans le chat. Récupère automatiquement le nom de la sim et les coordonnées. &lt;br /&gt;
N’affichera la destination que dans la sim où vous êtes. Illustre une manipulation avancée des listes.&lt;br /&gt;
|-&lt;br /&gt;
||[[Texture Menu Management|Texture Management]]&lt;br /&gt;
||[[User:Revolution Perenti|Revolution Perenti]]&lt;br /&gt;
||Boîte de dialogue pour gérer des textures.&lt;br /&gt;
|-&lt;br /&gt;
||[[Tic Tac Toe]]&lt;br /&gt;
||[[User:CG Linden|CG Linden]]&lt;br /&gt;
||Une démo pas à pas de comment développer un projet de script plus important.&lt;br /&gt;
|-&lt;br /&gt;
||[[TightList]]&lt;br /&gt;
||[[User:Strife Onizuka|Revolution Perenti]]&lt;br /&gt;
||Ce script permet d’encoder et de décoder des lists en string. &lt;br /&gt;
Il y a deux options : TightList et TightListType. TightListType conserve le type et utilise 6 caractères en en-tête, TightList utilise un seul caractère en en-tête mais ne conserve pas le type. &lt;br /&gt;
|-&lt;br /&gt;
||[[Timer Module]]&lt;br /&gt;
||[[User:Isabelle Aquitaine|Isabelle Aquitaine]]&lt;br /&gt;
||Permet de gérer plusieurs timers au travers de messages liés.&lt;br /&gt;
|-&lt;br /&gt;
||[[Unix2DateTime]]&lt;br /&gt;
|[[User:Flennan Roffo|Flennan Roffo]]&lt;br /&gt;
||Conversion du temps Unix (llGetUnixTime()) en string ( date/heure)  et vice versa.&lt;br /&gt;
|-&lt;br /&gt;
||[[Under Age Boot]]&lt;br /&gt;
|[[User:Chance Unknown|Chance Unknown]]&lt;br /&gt;
||Système de sécurité qui permet de téléporter des avatars jusqu&#039;à leur maison s’ils sont en dessous d’un âge limite (utile pour lutter contre les abus)&lt;br /&gt;
|-&lt;br /&gt;
||[[WarpPos]]&lt;br /&gt;
|[[User:Keknehv Psaltery|Keknehv Psaltery]]&lt;br /&gt;
||Un script qui permet de dépasser la limite théorique de 10m des déplacements non physiques (téléportation)&lt;br /&gt;
|-&lt;br /&gt;
||[[XTEA Strong Encryption Implementation]]&lt;br /&gt;
||[[User:Morse Dillon|Morse Dillon]]&lt;br /&gt;
||Implémentation en LSL de XTEA (eXtended Tiny Encryption Algorithm). Il s’agit de la première mise à disposition du public d’un algorithme de cryptage assurant un haut niveau de sécurité. Ce script est proposé sous GNU General Public License (GPL).&lt;br /&gt;
|-&lt;br /&gt;
||[[XyText 1.5|XyText]]&lt;br /&gt;
||[[User:Xylor Baysklef|Xylor Baysklef]]&lt;br /&gt;
||Affiche un texte (jusqu’à 10 caractères) sur une prim.&lt;br /&gt;
|-&lt;br /&gt;
||[[XyzzyText|XyzzyText]]&lt;br /&gt;
||[[User:Thraxis Epsilon|Thraxis Epsilon]] and [[User:Gigs Taggart|Gigs Taggart]]&lt;br /&gt;
|| Affiche un texte (jusqu’à 10 caractères). Plus efficace que XyText.&lt;br /&gt;
|-&lt;br /&gt;
||[[Zero Lag Poseball]]&lt;br /&gt;
||[[User:Jippen Faddoul|Jippen Faddoul]]&lt;br /&gt;
||Une poseball sans lag.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bibliothèque de scripts compatibles avec le LSL ==&lt;br /&gt;
Vous trouverez ici des scripts écrits dans d’autres langages et à lancer sur d’autres systèmes mais qui supportent des scripts en LSL.&lt;br /&gt;
 {| {{Prettytable/fr}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Nom&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Créateur&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||[[HTTP Post request to a PHP server]]&lt;br /&gt;
||[[User:Corto Maltese|Corto Maltese]]&lt;br /&gt;
||Cette bibliothèque permet de faire des requêtes vers votre site web en utilisant les variable php $_POST (un simple controle est egalement fait pour eviter les requetes illicites). Client : script LSL // Serveur : script  PHP.&lt;br /&gt;
|-&lt;br /&gt;
|| Silo&lt;br /&gt;
|| [[User:Zero_Linden|Zero Linden]]&lt;br /&gt;
|| A pour principal objectif de stocker des données en PHP. Transfert réalisé au travers de [[llHTTPRequest/fr|llHTTPRequest]]. Voyez également :&lt;br /&gt;
* [http://www.notabene-sl.com/misc/silo-README.txt README] file&lt;br /&gt;
* [http://www.notabene-sl.com/misc/silo.tgz silo.tgz] tarball&lt;br /&gt;
* forum [http://forums.secondlife.com/showthread.php?t=119570 Announcement].&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:SignpostMarv Martin/PHP/llXorBase64StringsCorrect|llXorBase64StringsCorrect]]&lt;br /&gt;
|| [[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
||Une implémentation de [[llXorBase64StringsCorrect/fr|llXorBase64StringsCorrect]] en PHP – Peut être utile en cas d’utilisation de llXorBase64StringsCorrect pour crypter vos données en LSL2 et pour les poster sur le web via [[llHTTPRequest]].&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:SignpostMarv Martin/PHP/lsl fu.php|lsl_fu.php]]&lt;br /&gt;
|| [[User:SignpostMarv Martin|SignpostMarv Martin]]&lt;br /&gt;
|| A basic OOP&#039;d PHP Class containing VeloxSeverine&#039;s $_POST fixer and Marv&#039;s own eccentric ideas for &amp;quot;fixing&amp;quot; things.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== A voir également==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Articles&#039;&#039;&#039;&lt;br /&gt;
*[[:Category:LSL Examples/fr|Exemples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Secure_HTTP_Post&amp;diff=75911</id>
		<title>Talk:Secure HTTP Post</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Secure_HTTP_Post&amp;diff=75911"/>
		<updated>2008-07-02T21:17:17Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Talk:Secure HTTP Post moved to Talk:HTTP Post request to a PHP server: Some people wrote a much better encryption page.
this library is still valid to implement a simple PHP POST though&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:HTTP Post request to a PHP server]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75910</id>
		<title>Talk:HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75910"/>
		<updated>2008-07-02T21:17:17Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Talk:Secure HTTP Post moved to Talk:HTTP Post request to a PHP server: Some people wrote a much better encryption page.
this library is still valid to implement a simple PHP POST though&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Talk}}&lt;br /&gt;
Is it possible to provide known input values and intercept the hash as it is passed to the web server thereby determining the secret key?  Is providing the hash as part of the URL the best strategy?&lt;br /&gt;
[[User:Hackshaven Harford]]&lt;br /&gt;
&lt;br /&gt;
Transmitting the hash is perfectly safe however the method for calculating the hash will lead to the eventual brute forcing of SECRET_NUMBER. Since this script is open source and only uses a 32bit secret, an attack only needs to intercept one message. At the point in the PHP script where the hash is checked the attacker would systematically try every single MD5 nonce, until one of them worked. A year or so ago I was doing some consulting for a guy who was developing a similar system. Using an open source MD5 implementation written in C that I tweaked, I was able to try every nonce in less then 24 hours on a 600MHz Pentium 3. Imagine how fast it would run if it were multi-threaded on a modern multi-core system, now imagine a small cluster of modern computers. If you don&#039;t mind it taking several months you can also do this in LSL. If you want to make sure you don&#039;t get communication injections &#039;&#039;&#039;don&#039;t use this script&#039;&#039;&#039;. -- [[User:Strife Onizuka|Strife Onizuka]] 09:17, 25 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Strife makes a great point, 32bits is not enough. Strife, I&#039;d like to know what you think is the correct way given the tools we&#039;ve got. In the meantime, I think you can afford a significant amount of extra protection by using a longer passphrase in place of the 32bit nonce.&lt;br /&gt;
 string XREQUEST_PASSPHRASE = &amp;quot;nVBh)cCBy7l6ieihewF3Y__QZZ&amp;quot;;&lt;br /&gt;
 string hash=llMD5String(body + XREQUEST_PASSPHRASE,0);&lt;br /&gt;
If you make some guesstimates about how long (z) it takes to brute force (x) bits on a cluster of cost (y), you can then measure your paranoia precisely and create a passphrase to suit.&lt;br /&gt;
Any objections to this implementation? It&#039;s still not great, but what else have we got?&lt;br /&gt;
--[[User:Nite Zelmanov|Nite Zelmanov]] 20:37, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
For general paranoia purposes you should use the nonce and a prefixed string; waste not, want not. Regardless how you affix the secret, it is my belief that the secret shouldn&#039;t be a string or an integer but an algorithm. A black box that can be fed a secret &amp;amp; the day/time and spit out a reproducible response. You then use the result of that alg as your secret for your hash. When someone cracks the secret used to hash a single message it won&#039;t be the same secret used on other messages, or at least not many; hopefully by the time they have cracked the temporal secret it will have expired. An attacker would have to brute force multiple temporal secrets to even start trying to figure out how the black box worked. By combining time with your secret in a non-obvious way you can protect your secret from direct brute forcing. There are other ways... If you know every message is going to be received, you can increment your secret (as a result of passing it through the black box).  You want to prefix your (temporary) secret and not postfix it to the data you are hashing. MD5 uses 64 byte blocks, you build the final hash one block at a time. If the secret is postfixed the cracker can cache the temporary value up to the last complete block; in effect they only have to brute force the hash on one block instead of the complete message. By prefixing the secret the caching optimization can&#039;t be used. -- [[User:Strife Onizuka|Strife Onizuka]] 22:03, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
A simple black box:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//I prefer an MD5 because it shakes up the bits.&lt;br /&gt;
string BlackBox(string secret, integer nonce)//changes every minute&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash(string data, string secret, integer nonce)&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce ^ 0x7e9b23f1) + data, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash2(string data, string secret, integer nonce, integer offset)&lt;br /&gt;
{//for the main hash, the nonce is a moving target.&lt;br /&gt;
//In essence this function allows for the use of 3 secrets: secret, nonce and offset.&lt;br /&gt;
    return llMD5String(data, (integer)(&amp;quot;0x&amp;quot; + llGetSubString(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce),offset,(offset + 7)%32)));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
&lt;br /&gt;
== dual Key PGP? ==&lt;br /&gt;
&lt;br /&gt;
Could this be written to use dual key (public/private) encryption? Or would that require a full implementation of PGP for LSL?&lt;br /&gt;
&lt;br /&gt;
For example: an lsl wrapper could be written/added for GnuPG, assuming it is installed on Linden&#039;s servers. Then the object could be given the public key of the web resource it is accessing, and only the web server (also using GnuPG) could decrypt using its private key.&lt;br /&gt;
&lt;br /&gt;
An encryted return could be achieved by having every member UID have a public and private key (public key published as part of a Linden web service, private key only known to the server -- not even the user would know it), and the web server would encrypt the message using the user&#039;s public key, and the object would access another wrapper function using the user&#039;s UID, the function accessing the user&#039;s private key and returning the decrypted message.&lt;br /&gt;
&lt;br /&gt;
Any thoughts?&lt;br /&gt;
-- [[User:Caelgarr Oconnell|Caelgarr Oconnell]]&lt;br /&gt;
&lt;br /&gt;
== PGP Brute force ==&lt;br /&gt;
&lt;br /&gt;
This library did offer 2 things:&lt;br /&gt;
 (1) HTTP Post&lt;br /&gt;
 (2) MD5 CRC&lt;br /&gt;
&lt;br /&gt;
1 - For the HTTP Post to work, you have to format the posted data in a certain way.&lt;br /&gt;
With this technique you can send a List of variable to a server.&lt;br /&gt;
And the server can collect the data using its normal Post variables.&lt;br /&gt;
The result s technique &lt;br /&gt;
&lt;br /&gt;
         if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
         body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
&lt;br /&gt;
2 - The MD5 Crc, controls that the request is correct.&lt;br /&gt;
This makes a checksum of the entire request and make sure that it was received properly.&lt;br /&gt;
As you said, this not the most secure algorithm. &lt;br /&gt;
The checksum number is 32 bits.&lt;br /&gt;
So if you work brute force on it (assuming you know the host name, the URL, and the variables names),&lt;br /&gt;
every request is stopping the script for 2 seconds. &lt;br /&gt;
It would take 70 years on average to find the right checksum.&lt;br /&gt;
You could obviously run simultaneous requests to an extent but this will still take a substantial amount of time to crack.&lt;br /&gt;
&lt;br /&gt;
However the security is not really all in the checksum.&lt;br /&gt;
As far as I know the request is not done on the client machine.&lt;br /&gt;
The web request is done from Linden server to your own or hosted website.&lt;br /&gt;
In order to crack the request you would need to guess the Host name, the URL of the HTTP post, and the magic number.&lt;br /&gt;
&lt;br /&gt;
This said, I take your point about the fact that you could still crack it. &lt;br /&gt;
So, I will add a SECURE_STRING parameter to make the SECURE_NUMBER harder to guess when the posted variable is empty.&lt;br /&gt;
I think with this amendment it then become secure enough for most users.&lt;br /&gt;
&lt;br /&gt;
-- [[User:Corto Maltese|Corto Maltese]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Secure_HTTP_Post&amp;diff=75909</id>
		<title>Secure HTTP Post</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Secure_HTTP_Post&amp;diff=75909"/>
		<updated>2008-07-02T21:17:16Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Secure HTTP Post moved to HTTP Post request to a PHP server: Some people wrote a much better encryption page.
this library is still valid to implement a simple PHP POST though&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[HTTP Post request to a PHP server]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75908</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75908"/>
		<updated>2008-07-02T21:17:16Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Secure HTTP Post moved to HTTP Post request to a PHP server: Some people wrote a much better encryption page.
this library is still valid to implement a simple PHP POST though&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
&lt;br /&gt;
The command let you send Post data to PHP.&lt;br /&gt;
The format of the HTTP Post is however a bit tricky.&lt;br /&gt;
&lt;br /&gt;
With this library let you call a PHP page and post as many variables in your call as you want.&lt;br /&gt;
&lt;br /&gt;
On top of that I introduce a little checksum/password sytem to limit potential abuse.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 string SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75906</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75906"/>
		<updated>2008-07-02T21:15:22Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
&lt;br /&gt;
The command let you send Post data to PHP.&lt;br /&gt;
The format of the HTTP Post is however a bit tricky.&lt;br /&gt;
&lt;br /&gt;
With this library let you call a PHP page and post as many variables in your call as you want.&lt;br /&gt;
&lt;br /&gt;
On top of that I introduce a little checksum/password sytem to limit potential abuse.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 string SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75901</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75901"/>
		<updated>2008-07-02T21:09:45Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* How to use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
This now works quite well but scripters need to be careful of potential attacks.&lt;br /&gt;
&lt;br /&gt;
In any scenario, it is safe to check that the request comes from one of your scripts only.&lt;br /&gt;
&lt;br /&gt;
So I made a little function called xrequest, this function will make a request to a PHP page using your own secure SECRET_NUMBER password.&lt;br /&gt;
The PHP script can check that the password is right before processing the request.&lt;br /&gt;
&lt;br /&gt;
This is simple and uses a good algorithm present in both LSL and PHP.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 string SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75900</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75900"/>
		<updated>2008-07-02T21:09:24Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
This now works quite well but scripters need to be careful of potential attacks.&lt;br /&gt;
&lt;br /&gt;
In any scenario, it is safe to check that the request comes from one of your scripts only.&lt;br /&gt;
&lt;br /&gt;
So I made a little function called xrequest, this function will make a request to a PHP page using your own secure SECRET_NUMBER password.&lt;br /&gt;
The PHP script can check that the password is right before processing the request.&lt;br /&gt;
&lt;br /&gt;
This is simple and uses a good algorithm present in both LSL and PHP.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 integer SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
xrequest(list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    string body;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // make it even&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body+llEscapeURL(SECRET_STRING),SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
    $s=str_replace(&lt;br /&gt;
      array(&amp;quot; &amp;quot;,&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
      array(&amp;quot;%20&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
      urlencode($s));&lt;br /&gt;
    return $s;&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
    global $body;&lt;br /&gt;
    $hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
    $body=&amp;quot;&amp;quot;;&lt;br /&gt;
    $cpt=0;&lt;br /&gt;
    $SECRET_NUMBER=123456789;&lt;br /&gt;
    $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
      if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
      $body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
    }&lt;br /&gt;
    $calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
    if ($hash!=$calcHash) &lt;br /&gt;
    {&lt;br /&gt;
      sleep(2); // slow down the requests&lt;br /&gt;
      echo &amp;quot;result=FAIL\nMSG=Invalid request.&amp;quot;; &lt;br /&gt;
      die;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75441</id>
		<title>Talk:HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75441"/>
		<updated>2008-06-30T19:21:50Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* PGP Brute force */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Talk}}&lt;br /&gt;
Is it possible to provide known input values and intercept the hash as it is passed to the web server thereby determining the secret key?  Is providing the hash as part of the URL the best strategy?&lt;br /&gt;
[[User:Hackshaven Harford]]&lt;br /&gt;
&lt;br /&gt;
Transmitting the hash is perfectly safe however the method for calculating the hash will lead to the eventual brute forcing of SECRET_NUMBER. Since this script is open source and only uses a 32bit secret, an attack only needs to intercept one message. At the point in the PHP script where the hash is checked the attacker would systematically try every single MD5 nonce, until one of them worked. A year or so ago I was doing some consulting for a guy who was developing a similar system. Using an open source MD5 implementation written in C that I tweaked, I was able to try every nonce in less then 24 hours on a 600MHz Pentium 3. Imagine how fast it would run if it were multi-threaded on a modern multi-core system, now imagine a small cluster of modern computers. If you don&#039;t mind it taking several months you can also do this in LSL. If you want to make sure you don&#039;t get communication injections &#039;&#039;&#039;don&#039;t use this script&#039;&#039;&#039;. -- [[User:Strife Onizuka|Strife Onizuka]] 09:17, 25 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Strife makes a great point, 32bits is not enough. Strife, I&#039;d like to know what you think is the correct way given the tools we&#039;ve got. In the meantime, I think you can afford a significant amount of extra protection by using a longer passphrase in place of the 32bit nonce.&lt;br /&gt;
 string XREQUEST_PASSPHRASE = &amp;quot;nVBh)cCBy7l6ieihewF3Y__QZZ&amp;quot;;&lt;br /&gt;
 string hash=llMD5String(body + XREQUEST_PASSPHRASE,0);&lt;br /&gt;
If you make some guesstimates about how long (z) it takes to brute force (x) bits on a cluster of cost (y), you can then measure your paranoia precisely and create a passphrase to suit.&lt;br /&gt;
Any objections to this implementation? It&#039;s still not great, but what else have we got?&lt;br /&gt;
--[[User:Nite Zelmanov|Nite Zelmanov]] 20:37, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
For general paranoia purposes you should use the nonce and a prefixed string; waste not, want not. Regardless how you affix the secret, it is my belief that the secret shouldn&#039;t be a string or an integer but an algorithm. A black box that can be fed a secret &amp;amp; the day/time and spit out a reproducible response. You then use the result of that alg as your secret for your hash. When someone cracks the secret used to hash a single message it won&#039;t be the same secret used on other messages, or at least not many; hopefully by the time they have cracked the temporal secret it will have expired. An attacker would have to brute force multiple temporal secrets to even start trying to figure out how the black box worked. By combining time with your secret in a non-obvious way you can protect your secret from direct brute forcing. There are other ways... If you know every message is going to be received, you can increment your secret (as a result of passing it through the black box).  You want to prefix your (temporary) secret and not postfix it to the data you are hashing. MD5 uses 64 byte blocks, you build the final hash one block at a time. If the secret is postfixed the cracker can cache the temporary value up to the last complete block; in effect they only have to brute force the hash on one block instead of the complete message. By prefixing the secret the caching optimization can&#039;t be used. -- [[User:Strife Onizuka|Strife Onizuka]] 22:03, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
A simple black box:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//I prefer an MD5 because it shakes up the bits.&lt;br /&gt;
string BlackBox(string secret, integer nonce)//changes every minute&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash(string data, string secret, integer nonce)&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce ^ 0x7e9b23f1) + data, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash2(string data, string secret, integer nonce, integer offset)&lt;br /&gt;
{//for the main hash, the nonce is a moving target.&lt;br /&gt;
//In essence this function allows for the use of 3 secrets: secret, nonce and offset.&lt;br /&gt;
    return llMD5String(data, (integer)(&amp;quot;0x&amp;quot; + llGetSubString(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce),offset,(offset + 7)%32)));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
&lt;br /&gt;
== dual Key PGP? ==&lt;br /&gt;
&lt;br /&gt;
Could this be written to use dual key (public/private) encryption? Or would that require a full implementation of PGP for LSL?&lt;br /&gt;
&lt;br /&gt;
For example: an lsl wrapper could be written/added for GnuPG, assuming it is installed on Linden&#039;s servers. Then the object could be given the public key of the web resource it is accessing, and only the web server (also using GnuPG) could decrypt using its private key.&lt;br /&gt;
&lt;br /&gt;
An encryted return could be achieved by having every member UID have a public and private key (public key published as part of a Linden web service, private key only known to the server -- not even the user would know it), and the web server would encrypt the message using the user&#039;s public key, and the object would access another wrapper function using the user&#039;s UID, the function accessing the user&#039;s private key and returning the decrypted message.&lt;br /&gt;
&lt;br /&gt;
Any thoughts?&lt;br /&gt;
-- [[User:Caelgarr Oconnell|Caelgarr Oconnell]]&lt;br /&gt;
&lt;br /&gt;
== PGP Brute force ==&lt;br /&gt;
&lt;br /&gt;
This library did offer 2 things:&lt;br /&gt;
 (1) HTTP Post&lt;br /&gt;
 (2) MD5 CRC&lt;br /&gt;
&lt;br /&gt;
1 - For the HTTP Post to work, you have to format the posted data in a certain way.&lt;br /&gt;
With this technique you can send a List of variable to a server.&lt;br /&gt;
And the server can collect the data using its normal Post variables.&lt;br /&gt;
The result s technique &lt;br /&gt;
&lt;br /&gt;
         if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
         body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
&lt;br /&gt;
2 - The MD5 Crc, controls that the request is correct.&lt;br /&gt;
This makes a checksum of the entire request and make sure that it was received properly.&lt;br /&gt;
As you said, this not the most secure algorithm. &lt;br /&gt;
The checksum number is 32 bits.&lt;br /&gt;
So if you work brute force on it (assuming you know the host name, the URL, and the variables names),&lt;br /&gt;
every request is stopping the script for 2 seconds. &lt;br /&gt;
It would take 70 years on average to find the right checksum.&lt;br /&gt;
You could obviously run simultaneous requests to an extent but this will still take a substantial amount of time to crack.&lt;br /&gt;
&lt;br /&gt;
However the security is not really all in the checksum.&lt;br /&gt;
As far as I know the request is not done on the client machine.&lt;br /&gt;
The web request is done from Linden server to your own or hosted website.&lt;br /&gt;
In order to crack the request you would need to guess the Host name, the URL of the HTTP post, and the magic number.&lt;br /&gt;
&lt;br /&gt;
This said, I take your point about the fact that you could still crack it. &lt;br /&gt;
So, I will add a SECURE_STRING parameter to make the SECURE_NUMBER harder to guess when the posted variable is empty.&lt;br /&gt;
I think with this amendment it then become secure enough for most users.&lt;br /&gt;
&lt;br /&gt;
-- [[User:Corto Maltese|Corto Maltese]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75440</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=75440"/>
		<updated>2008-06-30T19:20:08Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
This now works quite well but scripters need to be careful of potential attacks.&lt;br /&gt;
&lt;br /&gt;
In any scenario, it is safe to check that the request comes from one of your scripts only.&lt;br /&gt;
&lt;br /&gt;
So I made a little function called xrequest, this function will make a request to a PHP page using your own secure SECRET_NUMBER password.&lt;br /&gt;
The PHP script can check that the password is right before processing the request.&lt;br /&gt;
&lt;br /&gt;
This is simple and uses a good algorithm present in both LSL and PHP.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER and a SECRET_STRING.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 integer SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 xrequest(string url, list l)&lt;br /&gt;
 {&lt;br /&gt;
     integer i;&lt;br /&gt;
     integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
     string body;&lt;br /&gt;
 &lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
         string varname=llList2String(l,i);&lt;br /&gt;
         string varvalue=llList2String(l,i + 1);&lt;br /&gt;
         if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
         body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
     }&lt;br /&gt;
     string hash=llMD5String(body+SECRET_STRING,SECRET_NUMBER);&lt;br /&gt;
     http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
  	return str_replace(&lt;br /&gt;
  		array(&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
  		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
  		urlencode($s));&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
  	global $body;&lt;br /&gt;
  	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
  	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
  	$cpt=0;&lt;br /&gt;
  	$SECRET_NUMBER=123456789;&lt;br /&gt;
        $SECRET_STRING=&amp;quot;XD4@5#-m&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
  		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
  		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
  	}&lt;br /&gt;
  	$calcHash=md5($body.$SECRET_STRING.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
  	if ($hash!=$calcHash) &lt;br /&gt;
  	{&lt;br /&gt;
  		sleep(2); // slow down the requests&lt;br /&gt;
  		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;; + $body=&amp;quot;&amp;quot;; &lt;br /&gt;
  		die;&lt;br /&gt;
  	}&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75439</id>
		<title>Talk:HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:HTTP_Post_request_to_a_PHP_server&amp;diff=75439"/>
		<updated>2008-06-30T19:16:59Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: New section: PGP Brute force&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Talk}}&lt;br /&gt;
Is it possible to provide known input values and intercept the hash as it is passed to the web server thereby determining the secret key?  Is providing the hash as part of the URL the best strategy?&lt;br /&gt;
[[User:Hackshaven Harford]]&lt;br /&gt;
&lt;br /&gt;
Transmitting the hash is perfectly safe however the method for calculating the hash will lead to the eventual brute forcing of SECRET_NUMBER. Since this script is open source and only uses a 32bit secret, an attack only needs to intercept one message. At the point in the PHP script where the hash is checked the attacker would systematically try every single MD5 nonce, until one of them worked. A year or so ago I was doing some consulting for a guy who was developing a similar system. Using an open source MD5 implementation written in C that I tweaked, I was able to try every nonce in less then 24 hours on a 600MHz Pentium 3. Imagine how fast it would run if it were multi-threaded on a modern multi-core system, now imagine a small cluster of modern computers. If you don&#039;t mind it taking several months you can also do this in LSL. If you want to make sure you don&#039;t get communication injections &#039;&#039;&#039;don&#039;t use this script&#039;&#039;&#039;. -- [[User:Strife Onizuka|Strife Onizuka]] 09:17, 25 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Strife makes a great point, 32bits is not enough. Strife, I&#039;d like to know what you think is the correct way given the tools we&#039;ve got. In the meantime, I think you can afford a significant amount of extra protection by using a longer passphrase in place of the 32bit nonce.&lt;br /&gt;
 string XREQUEST_PASSPHRASE = &amp;quot;nVBh)cCBy7l6ieihewF3Y__QZZ&amp;quot;;&lt;br /&gt;
 string hash=llMD5String(body + XREQUEST_PASSPHRASE,0);&lt;br /&gt;
If you make some guesstimates about how long (z) it takes to brute force (x) bits on a cluster of cost (y), you can then measure your paranoia precisely and create a passphrase to suit.&lt;br /&gt;
Any objections to this implementation? It&#039;s still not great, but what else have we got?&lt;br /&gt;
--[[User:Nite Zelmanov|Nite Zelmanov]] 20:37, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
For general paranoia purposes you should use the nonce and a prefixed string; waste not, want not. Regardless how you affix the secret, it is my belief that the secret shouldn&#039;t be a string or an integer but an algorithm. A black box that can be fed a secret &amp;amp; the day/time and spit out a reproducible response. You then use the result of that alg as your secret for your hash. When someone cracks the secret used to hash a single message it won&#039;t be the same secret used on other messages, or at least not many; hopefully by the time they have cracked the temporal secret it will have expired. An attacker would have to brute force multiple temporal secrets to even start trying to figure out how the black box worked. By combining time with your secret in a non-obvious way you can protect your secret from direct brute forcing. There are other ways... If you know every message is going to be received, you can increment your secret (as a result of passing it through the black box).  You want to prefix your (temporary) secret and not postfix it to the data you are hashing. MD5 uses 64 byte blocks, you build the final hash one block at a time. If the secret is postfixed the cracker can cache the temporary value up to the last complete block; in effect they only have to brute force the hash on one block instead of the complete message. By prefixing the secret the caching optimization can&#039;t be used. -- [[User:Strife Onizuka|Strife Onizuka]] 22:03, 27 September 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
A simple black box:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//I prefer an MD5 because it shakes up the bits.&lt;br /&gt;
string BlackBox(string secret, integer nonce)//changes every minute&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash(string data, string secret, integer nonce)&lt;br /&gt;
{&lt;br /&gt;
    return llMD5String(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce ^ 0x7e9b23f1) + data, nonce);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
string Hash2(string data, string secret, integer nonce, integer offset)&lt;br /&gt;
{//for the main hash, the nonce is a moving target.&lt;br /&gt;
//In essence this function allows for the use of 3 secrets: secret, nonce and offset.&lt;br /&gt;
    return llMD5String(data, (integer)(&amp;quot;0x&amp;quot; + llGetSubString(llMD5String(llGetSubString(llGetTimestamp(),0,15) + secret, nonce),offset,(offset + 7)%32)));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Strife Onizuka|Strife Onizuka]]&lt;br /&gt;
&lt;br /&gt;
== dual Key PGP? ==&lt;br /&gt;
&lt;br /&gt;
Could this be written to use dual key (public/private) encryption? Or would that require a full implementation of PGP for LSL?&lt;br /&gt;
&lt;br /&gt;
For example: an lsl wrapper could be written/added for GnuPG, assuming it is installed on Linden&#039;s servers. Then the object could be given the public key of the web resource it is accessing, and only the web server (also using GnuPG) could decrypt using its private key.&lt;br /&gt;
&lt;br /&gt;
An encryted return could be achieved by having every member UID have a public and private key (public key published as part of a Linden web service, private key only known to the server -- not even the user would know it), and the web server would encrypt the message using the user&#039;s public key, and the object would access another wrapper function using the user&#039;s UID, the function accessing the user&#039;s private key and returning the decrypted message.&lt;br /&gt;
&lt;br /&gt;
Any thoughts?&lt;br /&gt;
-- [[User:Caelgarr Oconnell|Caelgarr Oconnell]]&lt;br /&gt;
&lt;br /&gt;
== PGP Brute force ==&lt;br /&gt;
&lt;br /&gt;
This library did offer 2 things:&lt;br /&gt;
 (1) HTTP Post&lt;br /&gt;
 (2) MD5 CRC&lt;br /&gt;
&lt;br /&gt;
1 - For the HTTP Post to work, you have to format the posted data in a certain way.&lt;br /&gt;
With this technique you can send a List of variable to a server.&lt;br /&gt;
And the server can collect the data using its normal Post variables.&lt;br /&gt;
The result s technique &lt;br /&gt;
&lt;br /&gt;
         if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
         body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
&lt;br /&gt;
2 - The MD5 Crc, controls that the request is correct.&lt;br /&gt;
This makes a checksum of the entire request and make sure that it was received properly.&lt;br /&gt;
As you said, this not the most secure algorithm. &lt;br /&gt;
The checksum number is 32 bits.&lt;br /&gt;
So if you work brute force on it (assuming you know the host name, the URL, and the variables names),&lt;br /&gt;
every request is stopping the script for 2 seconds. &lt;br /&gt;
It would take 70 years on average to find the right checksum.&lt;br /&gt;
You could obviously run simultaneous requests to an extent but this will still take a substantial amount of time to crack.&lt;br /&gt;
&lt;br /&gt;
However the security is not really all in the checksum.&lt;br /&gt;
As far as I know the request is not done on the client machine.&lt;br /&gt;
The web request is done from Linden server to your own or hosted website.&lt;br /&gt;
In order to crack the request you would need to guess the Host name, the URL of the HTTP post, and the magic number.&lt;br /&gt;
&lt;br /&gt;
This said, I take your point about the fact that you could still crack it. &lt;br /&gt;
So, I will add a SECURE_STRING parameter to make the SECURE_NUMBER harder to guess when the posted variable is empty.&lt;br /&gt;
I think with this amendment it then become secure enough for most users.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=68953</id>
		<title>User:Corto Maltese</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=68953"/>
		<updated>2008-05-26T10:56:29Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name in SL is Corto Maltese.&lt;br /&gt;
In SL am mainly a scripter and I like to design games.&lt;br /&gt;
&lt;br /&gt;
I post here my own scripts, scripts I update to suit my own use, or answer to question I am asked.&lt;br /&gt;
&lt;br /&gt;
I also give some informal scripting lessons in French and English and here is some anwers of the questions I am asked to:&lt;br /&gt;
&lt;br /&gt;
 (FRENCH)[[comment un objet peut répondre a des commandes du clavier]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[iframe_test]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=43188</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=43188"/>
		<updated>2007-12-03T23:04:16Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
Second life allow script to make requests to a web site.&lt;br /&gt;
This now works quite well but scripters need to be careful of potential attacks.&lt;br /&gt;
&lt;br /&gt;
In any scenario, it is safe to check that the request comes from one of your scripts only.&lt;br /&gt;
&lt;br /&gt;
So I made a little function called xrequest, this function will make a request to a PHP page using your own secure SECRET_NUMBER password.&lt;br /&gt;
The PHP script can check that the password is right before processing the request.&lt;br /&gt;
&lt;br /&gt;
This is simple and uses a good algorithm present in both LSL and PHP.&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The second life script&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the beginning of your script you must copy the xrequest function&lt;br /&gt;
and also choose a SECRET_NUMBER.&lt;br /&gt;
In SL you should also make sure that the script is not visible to other people than yourself (this is the default access right).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 integer SECRET_NUMBER=123456789;&lt;br /&gt;
 &lt;br /&gt;
 xrequest(string url, list l)&lt;br /&gt;
 {&lt;br /&gt;
     integer i;&lt;br /&gt;
     integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
     string body;&lt;br /&gt;
 &lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
         string varname=llList2String(l,i);&lt;br /&gt;
         string varvalue=llList2String(l,i + 1);&lt;br /&gt;
         if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
         body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
     }&lt;br /&gt;
     string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
     http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a call to the function you have to provide 2 parameters:&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
xrequest(&amp;quot;http://www.yourserver.com/your_page.php&amp;quot;,[&amp;quot;parameter1&amp;quot;,123,&amp;quot;parameter2&amp;quot;,&amp;quot;parameter2 value&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
The first parameter is the address of the webpage which will process your request. I assume, you own a website which supports PHP (about any version).&lt;br /&gt;
&lt;br /&gt;
The second parameter is a list containing the parameters you want to pass to the page.&lt;br /&gt;
They will be sent to the page as if they had been type in a WebForm.&lt;br /&gt;
The list can be empty [] or contain any number of &#039;variable name&#039;,&#039;variable value&#039; pairs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The PHP Page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The php page must contains the function below, if you&#039;re a PHP wiz, you also include it inside another file.&lt;br /&gt;
&lt;br /&gt;
Note that the page must be modified to contain your own SECRET_NUMBER.&lt;br /&gt;
Your page will then use the function checkHash() to make sure the correct password was used.&lt;br /&gt;
If the password is wrong, the page won&#039;t run any further.&lt;br /&gt;
&lt;br /&gt;
If the password is right you can then read the content of the parameters using a simple $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
  function llEscapeURL($s)&lt;br /&gt;
  {&lt;br /&gt;
  	return str_replace(&lt;br /&gt;
  		array(&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
  		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
  		urlencode($s));&lt;br /&gt;
  }   &lt;br /&gt;
  &lt;br /&gt;
  // this my main SL page XML-RPC page&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
  	global $body;&lt;br /&gt;
  	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
  	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
  	$cpt=0;&lt;br /&gt;
  	$SECRET_NUMBER=123456789;&lt;br /&gt;
  	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
  		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
  		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
  	}&lt;br /&gt;
  	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
  	if ($hash!=$calcHash) &lt;br /&gt;
  	{&lt;br /&gt;
  		sleep(2); // slow down the requests&lt;br /&gt;
  		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;; + $body=&amp;quot;&amp;quot;; &lt;br /&gt;
  		die;&lt;br /&gt;
  	}&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I hope it helps.&lt;br /&gt;
Don&#039;t hesitate to ask any question to Corto Maltese or improve this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Library}}&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=SLEGO&amp;diff=17255</id>
		<title>SLEGO</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=SLEGO&amp;diff=17255"/>
		<updated>2007-04-15T15:48:48Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SLEGO Competion in May&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17029</id>
		<title>Comment un objet peut répondre a des commandes du clavier</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17029"/>
		<updated>2007-04-08T17:57:11Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Question de Map McMillan&lt;br /&gt;
&lt;br /&gt;
Sur certaine places, la plupart du temps, les balls sont cachées par un truc du genre « /1 hidden » et visibles avec « /2 shown »&lt;br /&gt;
&lt;br /&gt;
Est il possible de :&lt;br /&gt;
&lt;br /&gt;
1/ choisir un canal personnalisé ? pas « 1 »… mais « /moi » ou » /map » ou « /1map » ou &amp;quot;/n&#039;importe quel autre mot ou chiffre&amp;quot;&lt;br /&gt;
&lt;br /&gt;
La reponse est oui. Pour detected /map il faut ecouter le cannal 0&lt;br /&gt;
&lt;br /&gt;
2/ de faire pareil avec tt les prims? pas uniquement les balls mais aussi des trucs genre les meubles dans 1 maison ?&lt;br /&gt;
&lt;br /&gt;
Oui, tous les prims dans SL sont egaux, pas besoin d&#039;etre une boule.&lt;br /&gt;
&lt;br /&gt;
3/ sinon comment faire pour que les dits « home furnitures » ne soient pas utilisables par le 1er voyageur de passage ?&lt;br /&gt;
&lt;br /&gt;
Voir llGetOwner() plus bas.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Je vais répondre a toutes ces questions mais plutot de répondre point par point je vais expliquer les mécanismes sous jacents.&lt;br /&gt;
&lt;br /&gt;
== Les cannaux de chat ==&lt;br /&gt;
&lt;br /&gt;
Second Life a un systeme de chat assez puissant; Il y a 4294967296 canaux numérotés de -2147483648 a +2147483647.&lt;br /&gt;
En general quand on parle on utilise le canal 0. &lt;br /&gt;
Par exemple quand on tape &#039;Hello&#039; ca utilise le canal 0 et ca produit le meme effet que de taper /0 Hello.&lt;br /&gt;
Avec le clavier on peut aussi envoyer un message dans un cannal différent.&lt;br /&gt;
Par exemple &#039;/123 Hello&#039; envoie le message Hello dans le cannal 123.&lt;br /&gt;
Pour peu qu&#039;un script ecoute ce cannal, il peut repondre a cette commande.&lt;br /&gt;
&lt;br /&gt;
== Mais comment est-ce qu&#039;un script peut ecouter un cannal?==&lt;br /&gt;
&lt;br /&gt;
La commande principale est llListen, llListen ecoute un cannal, une personne ou toutes, et un message ou tous.&lt;br /&gt;
La syntaxe est&lt;br /&gt;
          llListen(integer cannal,string nom,key id, string message);&lt;br /&gt;
Souvent on utilise comme ca:&lt;br /&gt;
          llListen(123,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
La ca ecoute tout sur le cannal 123.&lt;br /&gt;
&lt;br /&gt;
Notez que l&#039;on peut ecouter le cannal de chat normal.&lt;br /&gt;
          llListen(0,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);     &lt;br /&gt;
&lt;br /&gt;
Quand un message est détecté, le sim lance l&#039;event listen dans votre script&lt;br /&gt;
&lt;br /&gt;
      listen(integer channel, string name, key id, string msg)&lt;br /&gt;
&lt;br /&gt;
Channel est le channel recu.&lt;br /&gt;
Name et id, c&#039;est la personne ou l&#039;objet qui a envoyé le message.&lt;br /&gt;
Msg c&#039;est le contenu du message.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Voici un exemple un peu plus complet:&lt;br /&gt;
Ce script ecoute le cannal 5, mais uniquement le proprietaire du prim.&lt;br /&gt;
Les commandes sont &#039;/5 rouge&#039;, &#039;/5 vert&#039;, et &#039;/5 bleu&#039;. Je vous laisse deviner ce que ca fait.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
          string name=&amp;quot;&amp;quot;;      // j&#039;ecoute tous les noms&lt;br /&gt;
          key id=llGetOwner(); // mais uniquement mon proprio&lt;br /&gt;
          string msg=&amp;quot;&amp;quot;;       // j&#039;ecoute tous les messages&lt;br /&gt;
          llListen(5,name,id,msg);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      changed(integer st)&lt;br /&gt;
      {&lt;br /&gt;
          // ca c&#039;est pour relancer le listen&lt;br /&gt;
          // quand l&#039;objet change de proprietaire&lt;br /&gt;
          if (st &amp;amp; CHANGED_OWNER)&lt;br /&gt;
              llResetScript();&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      listen(integer channel, string name, key id, string msg)&lt;br /&gt;
      {&lt;br /&gt;
          // cette ligne n&#039;est pas réellement  nescessaire ici&lt;br /&gt;
          // comme on ecoute qu&#039;une personne et qu&#039;un cannal&lt;br /&gt;
          if (id==llGetOwner() &amp;amp;&amp;amp; channel==5) &lt;br /&gt;
          {    &lt;br /&gt;
              if (msg==&amp;quot;rouge&amp;quot;) llSetColor(&amp;lt;1,0,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;vert&amp;quot;) llSetColor(&amp;lt;0,1,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;bleu&amp;quot;) llSetColor(&amp;lt;0,0,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Détails interessants ==&lt;br /&gt;
1 - Les cannaux de SL ne son&#039;t pas sécurisés&lt;br /&gt;
&lt;br /&gt;
Particulierement tout cannal entre 0 et 100, est probablement utilisé par d&#039;autres scripts. Si vous faites un frigo qui s&#039;ouvre et se ferme sur commande c&#039;est surement pas tres grave mais soyez vigilant que ce que vous tapez ou faites taper sur un cannal peut etre écouté par quelqu&#039;un d&#039;autre.  &lt;br /&gt;
&lt;br /&gt;
2 - Les commandes llListen se ferment quand vous changez le &#039;state&#039; d&#039;un script&lt;br /&gt;
&lt;br /&gt;
Je sais pas si beaucoup de gens utilisent les scripts &#039;state&#039;. Si oui, il faut savoir que toutes les commandes listen sont fermées automatiquement quand vous changez de state, ou que le script est reset.&lt;br /&gt;
Dans l&#039;exemple plus haut, le reset a pour effet de fermer le listen pour le proprietaire precedent et reouvre pour le nouveau proprietaire.&lt;br /&gt;
&lt;br /&gt;
3 - Les commandes llSay sont lentes et pas garanties&lt;br /&gt;
Envoyer des messages d&#039;un objet a l&#039;autre en utilisant llSay et llListen est la seule facon pour transmettre des messages sur de longues distances.&lt;br /&gt;
Ce qu&#039;il faut savoir neanmoins c&#039;est que llSay produit un délai dans le script et aussi le listen event peut prendre beaucoup de temps a traiter la commande.&lt;br /&gt;
Quand le listen event prends du temps les commandes sont empilés et traitées une par une plus tard. Néanmoins quand la pile atteinds 30 ou 40, les messages sont perdus.&lt;br /&gt;
Ca arrive beaucoup au jeu de Tringo, le tableau mets du temps a raffraichir les scores et parfois certains scores sont perdus de cette facons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4 - Un script ne s&#039;entends pas &lt;br /&gt;
&lt;br /&gt;
Je peux me tromper mais je crois qu&#039;un script ne peut pas entendre un message qui provient du meme prim.&lt;br /&gt;
Si dans un script vous ecrivez llSay(5,&amp;quot;Rouge&amp;quot;); et que dans le meme script ou autre script du meme prim vous écriver llListen(5,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;); les message ne sont pas transmis.&lt;br /&gt;
Il y de meilleurs techniques (plus rapides et sécurisées) pour envoyer des messages de scripts en script; voir ((llMessageLinked)). &lt;br /&gt;
&lt;br /&gt;
5 - Une commande listen peut consommer beaucoup de ressources&lt;br /&gt;
&lt;br /&gt;
Gardez a l&#039;esprit que votre code listen va etre exécuté pour toutes les lignes tapées dans ce cannal.&lt;br /&gt;
Si vous avez beaucoup d&#039;objets qui ecoutent un cannal bruyant comme le cannal 0, vous pouvez assez ralentir le sim significativement.&lt;br /&gt;
Aussi si vous ecoutez de tres nombreux cannaux (qui n&#039;a pas écrit un Channel Scanner), le simulateur n&#039;aime pas beaucoup ca. A bon entendeur salut.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17022</id>
		<title>Comment un objet peut répondre a des commandes du clavier</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17022"/>
		<updated>2007-04-08T13:04:30Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Mais comment est-ce qu&amp;#039;un script peut ecouter un cannal? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Question de Map McMillan&lt;br /&gt;
&lt;br /&gt;
Sur certaine places, la plupart du temps, les balls sont cachées par un truc du genre « /1 hidden » et visibles avec « /2 shown »&lt;br /&gt;
&lt;br /&gt;
Est il possible de :&lt;br /&gt;
&lt;br /&gt;
1/ choisir un canal personnalisé ? pas « 1 »… mais « /moi » ou » /map » ou « /1map » ou &amp;quot;/n&#039;importe quel autre mot ou chiffre&amp;quot;&lt;br /&gt;
2/ de faire pareil avec tt les prims? pas uniquement les balls mais aussi des trucs genre les meubles dans 1 maison ?&lt;br /&gt;
3/ sinon comment faire pour que lesdits « home furnitures » ne soient pas utilisables par le 1er voyageur de passage ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Je vais répondre a toutes ces questions mais plutot de répondre point par point je vais expliquer les mécanismes sous jacents.&lt;br /&gt;
&lt;br /&gt;
== Les cannaux de chat ==&lt;br /&gt;
&lt;br /&gt;
Second Life a un systeme de chat assez puissant; Il y a 4294967296 canaux numérotés de -2147483648 a +2147483647.&lt;br /&gt;
En general quand on parle on utilise le canal 0. &lt;br /&gt;
Par exemple quand on tape &#039;Hello&#039; ca utilise le canal 0 et ca produit le meme effet que de taper /0 Hello.&lt;br /&gt;
Avec le clavier on peut aussi envoyer un message dans un cannal différent.&lt;br /&gt;
Par exemple &#039;/123 Hello&#039; envoie le message Hello dans le cannal 123.&lt;br /&gt;
Pour peu qu&#039;un script ecoute ce cannal, il peut repondre a cette commande.&lt;br /&gt;
&lt;br /&gt;
== Mais comment est-ce qu&#039;un script peut ecouter un cannal?==&lt;br /&gt;
&lt;br /&gt;
La commande principale est llListen, llListen ecoute un cannal, une personne ou toutes, et un message ou tous.&lt;br /&gt;
La syntaxe est&lt;br /&gt;
          llListen(integer cannal,string nom,key id, string message);&lt;br /&gt;
Souvent on utilise comme ca:&lt;br /&gt;
          llListen(123,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
La ca ecoute tout sur le cannal 123.&lt;br /&gt;
&lt;br /&gt;
Notez que l&#039;on peut ecouter le cannal de chat normal.&lt;br /&gt;
          llListen(0,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);     &lt;br /&gt;
&lt;br /&gt;
Quand un message est détecté, le sim lance l&#039;event listen dans votre script&lt;br /&gt;
&lt;br /&gt;
      listen(integer channel, string name, key id, string msg)&lt;br /&gt;
&lt;br /&gt;
Channel est le channel recu.&lt;br /&gt;
Name et id, c&#039;est la personne ou l&#039;objet qui a envoyé le message.&lt;br /&gt;
Msg c&#039;est le contenu du message.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Voici un exemple un peu plus complet:&lt;br /&gt;
Ce script ecoute le cannal 5, mais uniquement le proprietaire du prim.&lt;br /&gt;
Les commandes sont &#039;/5 rouge&#039;, &#039;/5 vert&#039;, et &#039;/5 bleu&#039;. Je vous laisse deviner ce que ca fait.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
          string name=&amp;quot;&amp;quot;;      // j&#039;ecoute tous les noms&lt;br /&gt;
          key id=llGetOwner(); // mais uniquement mon proprio&lt;br /&gt;
          string msg=&amp;quot;&amp;quot;;       // j&#039;ecoute tous les messages&lt;br /&gt;
          llListen(5,name,id,msg);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      changed(integer st)&lt;br /&gt;
      {&lt;br /&gt;
          // ca c&#039;est pour relancer le listen&lt;br /&gt;
          // quand l&#039;objet change de proprietaire&lt;br /&gt;
          if (st &amp;amp; CHANGED_OWNER)&lt;br /&gt;
              llResetScript();&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      listen(integer channel, string name, key id, string msg)&lt;br /&gt;
      {&lt;br /&gt;
          // cette ligne n&#039;est pas réellement  nescessaire ici&lt;br /&gt;
          // comme on ecoute qu&#039;une personne et qu&#039;un cannal&lt;br /&gt;
          if (id==llGetOwner() &amp;amp;&amp;amp; channel==5) &lt;br /&gt;
          {    &lt;br /&gt;
              if (msg==&amp;quot;rouge&amp;quot;) llSetColor(&amp;lt;1,0,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;vert&amp;quot;) llSetColor(&amp;lt;0,1,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;bleu&amp;quot;) llSetColor(&amp;lt;0,0,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Détails interessants ==&lt;br /&gt;
1 - Les cannaux de SL ne son&#039;t pas sécurisés&lt;br /&gt;
&lt;br /&gt;
Particulierement tout cannal entre 0 et 100, est probablement utilisé par d&#039;autres scripts. Si vous faites un frigo qui s&#039;ouvre et se ferme sur commande c&#039;est surement pas tres grave mais soyez vigilant que ce que vous tapez ou faites taper sur un cannal peut etre écouté par quelqu&#039;un d&#039;autre.  &lt;br /&gt;
&lt;br /&gt;
2 - Les commandes llListen se ferment quand vous changez le &#039;state&#039; d&#039;un script&lt;br /&gt;
&lt;br /&gt;
Je sais pas si beaucoup de gens utilisent les scripts &#039;state&#039;. Si oui, il faut savoir que toutes les commandes listen sont fermées automatiquement quand vous changez de state, ou que le script est reset.&lt;br /&gt;
Dans l&#039;exemple plus haut, le reset a pour effet de fermer le listen pour le proprietaire precedent et reouvre pour le nouveau proprietaire.&lt;br /&gt;
&lt;br /&gt;
3 - Les commandes llSay sont lentes et pas garanties&lt;br /&gt;
Envoyer des messages d&#039;un objet a l&#039;autre en utilisant llSay et llListen est la seule facon pour transmettre des messages sur de longues distances.&lt;br /&gt;
Ce qu&#039;il faut savoir neanmoins c&#039;est que llSay produit un délai dans le script et aussi le listen event peut prendre beaucoup de temps a traiter la commande.&lt;br /&gt;
Quand le listen event prends du temps les commandes sont empilés et traitées une par une plus tard. Néanmoins quand la pile atteinds 30 ou 40, les messages sont perdus.&lt;br /&gt;
Ca arrive beaucoup au jeu de Tringo, le tableau mets du temps a raffraichir les scores et parfois certains scores sont perdus de cette facons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4 - Un script ne s&#039;entends pas &lt;br /&gt;
&lt;br /&gt;
Je peux me tromper mais je crois qu&#039;un script ne peut pas entendre un message qui provient du meme prim.&lt;br /&gt;
Si dans un script vous ecrivez llSay(5,&amp;quot;Rouge&amp;quot;); et que dans le meme script ou autre script du meme prim vous écriver llListen(5,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;); les message ne sont pas transmis.&lt;br /&gt;
Il y de meilleurs techniques (plus rapides et sécurisées) pour envoyer des messages de scripts en script; voir ((llMessageLinked)). &lt;br /&gt;
&lt;br /&gt;
5 - Une commande listen peut consommer beaucoup de ressources&lt;br /&gt;
&lt;br /&gt;
Gardez a l&#039;esprit que votre code listen va etre exécuté pour toutes les lignes tapées dans ce cannal.&lt;br /&gt;
Si vous avez beaucoup d&#039;objets qui ecoutent un cannal bruyant comme le cannal 0, vous pouvez assez ralentir le sim significativement.&lt;br /&gt;
Aussi si vous ecoutez de tres nombreux cannaux (qui n&#039;a pas écrit un Channel Scanner), le simulateur n&#039;aime pas beaucoup ca. A bon entendeur salut.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17021</id>
		<title>Comment un objet peut répondre a des commandes du clavier</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Comment_un_objet_peut_r%C3%A9pondre_a_des_commandes_du_clavier&amp;diff=17021"/>
		<updated>2007-04-08T12:59:56Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Question de Map McMillan&lt;br /&gt;
&lt;br /&gt;
Sur certaine places, la plupart du temps, les balls sont cachées par un truc du genre « /1 hidden » et visibles avec « /2 shown »&lt;br /&gt;
&lt;br /&gt;
Est il possible de :&lt;br /&gt;
&lt;br /&gt;
1/ choisir un canal personnalisé ? pas « 1 »… mais « /moi » ou » /map » ou « /1map » ou &amp;quot;/n&#039;importe quel autre mot ou chiffre&amp;quot;&lt;br /&gt;
2/ de faire pareil avec tt les prims? pas uniquement les balls mais aussi des trucs genre les meubles dans 1 maison ?&lt;br /&gt;
3/ sinon comment faire pour que lesdits « home furnitures » ne soient pas utilisables par le 1er voyageur de passage ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Je vais répondre a toutes ces questions mais plutot de répondre point par point je vais expliquer les mécanismes sous jacents.&lt;br /&gt;
&lt;br /&gt;
== Les cannaux de chat ==&lt;br /&gt;
&lt;br /&gt;
Second Life a un systeme de chat assez puissant; Il y a 4294967296 canaux numérotés de -2147483648 a +2147483647.&lt;br /&gt;
En general quand on parle on utilise le canal 0. &lt;br /&gt;
Par exemple quand on tape &#039;Hello&#039; ca utilise le canal 0 et ca produit le meme effet que de taper /0 Hello.&lt;br /&gt;
Avec le clavier on peut aussi envoyer un message dans un cannal différent.&lt;br /&gt;
Par exemple &#039;/123 Hello&#039; envoie le message Hello dans le cannal 123.&lt;br /&gt;
Pour peu qu&#039;un script ecoute ce cannal, il peut repondre a cette commande.&lt;br /&gt;
&lt;br /&gt;
== Mais comment est-ce qu&#039;un script peut ecouter un cannal?==&lt;br /&gt;
&lt;br /&gt;
La commande principale est llListen, llListen ecoute un cannal, une personne ou toutes, et un message ou tous.&lt;br /&gt;
La syntaxe est&lt;br /&gt;
          llListen(integer cannal,string nom,key id, string message);&lt;br /&gt;
Souvent on utilise comme ca:&lt;br /&gt;
          llListen(123,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);&lt;br /&gt;
La ca ecoute tout sur le cannal 123.&lt;br /&gt;
&lt;br /&gt;
Notez que l&#039;on peut ecouter le cannal de chat normal.&lt;br /&gt;
          llListen(0,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;);     &lt;br /&gt;
&lt;br /&gt;
Voici un exemple un peu plus complet:&lt;br /&gt;
Ce script ecoute le cannal 5, mais uniquement le proprietaire du prim.&lt;br /&gt;
Les commandes sont &#039;/5 rouge&#039;, &#039;/5 vert&#039;, et &#039;/5 bleu&#039;. Je vous laisse deviner ce que ca fait.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
          string name=&amp;quot;&amp;quot;;      // j&#039;ecoute tous les noms&lt;br /&gt;
          key id=llGetOwner(); // mais uniquement mon proprio&lt;br /&gt;
          string msg=&amp;quot;&amp;quot;;       // j&#039;ecoute tous les messages&lt;br /&gt;
          llListen(5,name,id,msg);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      changed(integer st)&lt;br /&gt;
      {&lt;br /&gt;
          // ca c&#039;est pour relancer le listen&lt;br /&gt;
          // quand l&#039;objet change de proprietaire&lt;br /&gt;
          if (st &amp;amp; CHANGED_OWNER)&lt;br /&gt;
              llResetScript();&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      listen(integer channel, string name, key id, string msg)&lt;br /&gt;
      {&lt;br /&gt;
          // cette ligne n&#039;est pas réellement  nescessaire ici&lt;br /&gt;
          // comme on ecoute qu&#039;une personne et qu&#039;un cannal&lt;br /&gt;
          if (id==llGetOwner() &amp;amp;&amp;amp; channel==5) &lt;br /&gt;
          {    &lt;br /&gt;
              if (msg==&amp;quot;rouge&amp;quot;) llSetColor(&amp;lt;1,0,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;vert&amp;quot;) llSetColor(&amp;lt;0,1,0&amp;gt;, ALL_SIDES);&lt;br /&gt;
              if (msg==&amp;quot;bleu&amp;quot;) llSetColor(&amp;lt;0,0,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
== Détails interessants ==&lt;br /&gt;
1 - Les cannaux de SL ne son&#039;t pas sécurisés&lt;br /&gt;
&lt;br /&gt;
Particulierement tout cannal entre 0 et 100, est probablement utilisé par d&#039;autres scripts. Si vous faites un frigo qui s&#039;ouvre et se ferme sur commande c&#039;est surement pas tres grave mais soyez vigilant que ce que vous tapez ou faites taper sur un cannal peut etre écouté par quelqu&#039;un d&#039;autre.  &lt;br /&gt;
&lt;br /&gt;
2 - Les commandes llListen se ferment quand vous changez le &#039;state&#039; d&#039;un script&lt;br /&gt;
&lt;br /&gt;
Je sais pas si beaucoup de gens utilisent les scripts &#039;state&#039;. Si oui, il faut savoir que toutes les commandes listen sont fermées automatiquement quand vous changez de state, ou que le script est reset.&lt;br /&gt;
Dans l&#039;exemple plus haut, le reset a pour effet de fermer le listen pour le proprietaire precedent et reouvre pour le nouveau proprietaire.&lt;br /&gt;
&lt;br /&gt;
3 - Les commandes llSay sont lentes et pas garanties&lt;br /&gt;
Envoyer des messages d&#039;un objet a l&#039;autre en utilisant llSay et llListen est la seule facon pour transmettre des messages sur de longues distances.&lt;br /&gt;
Ce qu&#039;il faut savoir neanmoins c&#039;est que llSay produit un délai dans le script et aussi le listen event peut prendre beaucoup de temps a traiter la commande.&lt;br /&gt;
Quand le listen event prends du temps les commandes sont empilés et traitées une par une plus tard. Néanmoins quand la pile atteinds 30 ou 40, les messages sont perdus.&lt;br /&gt;
Ca arrive beaucoup au jeu de Tringo, le tableau mets du temps a raffraichir les scores et parfois certains scores sont perdus de cette facons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4 - Un script ne s&#039;entends pas &lt;br /&gt;
&lt;br /&gt;
Je peux me tromper mais je crois qu&#039;un script ne peut pas entendre un message qui provient du meme prim.&lt;br /&gt;
Si dans un script vous ecrivez llSay(5,&amp;quot;Rouge&amp;quot;); et que dans le meme script ou autre script du meme prim vous écriver llListen(5,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;); les message ne sont pas transmis.&lt;br /&gt;
Il y de meilleurs techniques (plus rapides et sécurisées) pour envoyer des messages de scripts en script; voir ((llMessageLinked)). &lt;br /&gt;
&lt;br /&gt;
5 - Une commande listen peut consommer beaucoup de ressources&lt;br /&gt;
&lt;br /&gt;
Gardez a l&#039;esprit que votre code listen va etre exécuté pour toutes les lignes tapées dans ce cannal.&lt;br /&gt;
Si vous avez beaucoup d&#039;objets qui ecoutent un cannal bruyant comme le cannal 0, vous pouvez assez ralentir le sim significativement.&lt;br /&gt;
Aussi si vous ecoutez de tres nombreux cannaux (qui n&#039;a pas écrit un Channel Scanner), le simulateur n&#039;aime pas beaucoup ca. A bon entendeur salut.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=17020</id>
		<title>User:Corto Maltese</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=17020"/>
		<updated>2007-04-08T12:20:14Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name in SL is Corto Maltese.&lt;br /&gt;
In SL am mainly a scripter and I like to design games.&lt;br /&gt;
&lt;br /&gt;
I post here my own scripts, scripts I update to suit my own use, or answer to question I am asked.&lt;br /&gt;
&lt;br /&gt;
I also give some informal scripting lessons in French and English and here is some anwers of the questions I am asked to:&lt;br /&gt;
&lt;br /&gt;
 (FRENCH)[[comment un objet peut répondre a des commandes du clavier]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=17019</id>
		<title>User:Corto Maltese</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=17019"/>
		<updated>2007-04-08T12:19:49Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name in SL is Corto Maltese.&lt;br /&gt;
In SL am mainly a scripter and I like to design games.&lt;br /&gt;
&lt;br /&gt;
I post here my own scripts, scripts I update to suit my own use, or answer to question I am asked.&lt;br /&gt;
&lt;br /&gt;
I also give some informal scripting lessons in French and English and here is some anwers of the questions I am asked to:&lt;br /&gt;
&lt;br /&gt;
 (FRENCH) ((comment un objet peut répondre a des commandes du clavier))&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=16879</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=16879"/>
		<updated>2007-04-06T10:43:50Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page pay.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
   &amp;lt;?php&lt;br /&gt;
   // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
   function llEscapeURL($s)&lt;br /&gt;
   {&lt;br /&gt;
   	return str_replace(&lt;br /&gt;
   		array(&amp;quot;+&amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
   		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
   		urlencode($s));&lt;br /&gt;
   }   &lt;br /&gt;
   &lt;br /&gt;
   // this my main SL page XML-RPC page&lt;br /&gt;
   function checkHash()&lt;br /&gt;
   {&lt;br /&gt;
   	global $body;&lt;br /&gt;
   	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
   	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
   	$cpt=0;&lt;br /&gt;
   	$SECRET_NUMBER=123456789;&lt;br /&gt;
   	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
   		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
   		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
   	}&lt;br /&gt;
   	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
   	if ($hash!=$calcHash) &lt;br /&gt;
   	{&lt;br /&gt;
   		sleep(2); // slow down the requests&lt;br /&gt;
   		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;; + $body=&amp;quot;&amp;quot;; &lt;br /&gt;
   		die;&lt;br /&gt;
   	}&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
   checkHash();&lt;br /&gt;
   // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
   echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Library|Secure HTTP Post]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=16878</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=16878"/>
		<updated>2007-04-06T09:33:32Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page pay.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
   &amp;lt;?php&lt;br /&gt;
   // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
   function llEscapeURL($s)&lt;br /&gt;
   {&lt;br /&gt;
   	return str_replace(&lt;br /&gt;
   		array(&amp;quot; &amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
   		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
   		urlencode($s));&lt;br /&gt;
   }   &lt;br /&gt;
   &lt;br /&gt;
   // this my main SL page XML-RPC page&lt;br /&gt;
   function checkHash()&lt;br /&gt;
   {&lt;br /&gt;
   	global $body;&lt;br /&gt;
   	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
   	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
   	$cpt=0;&lt;br /&gt;
   	$SECRET_NUMBER=123456789;&lt;br /&gt;
   	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
   		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
   		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
   	}&lt;br /&gt;
   	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
   	if ($hash!=$calcHash) &lt;br /&gt;
   	{&lt;br /&gt;
   		sleep(2); // slow down the requests&lt;br /&gt;
   		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;; + $body=&amp;quot;&amp;quot;; &lt;br /&gt;
   		die;&lt;br /&gt;
   	}&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
   checkHash();&lt;br /&gt;
   // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
   echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Library|Secure HTTP Post]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14725</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14725"/>
		<updated>2007-03-05T23:59:01Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page pay.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
   function llEscapeURL($s)&lt;br /&gt;
   {&lt;br /&gt;
   	$s=str_replace(&lt;br /&gt;
   		array(&amp;quot; &amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
   		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
   		urlencode($s));&lt;br /&gt;
   }   &lt;br /&gt;
   &lt;br /&gt;
   // this my main SL page XML-RPC page&lt;br /&gt;
   function checkHash()&lt;br /&gt;
   {&lt;br /&gt;
   	global $body;&lt;br /&gt;
   	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
   	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
   	$cpt=0;&lt;br /&gt;
   	$SECRET_NUMBER=123456789;&lt;br /&gt;
   	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
   		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
   		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
   	}&lt;br /&gt;
   	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
   	if ($hash!=$calcHash) &lt;br /&gt;
   	{&lt;br /&gt;
   		sleep(2); // slow down the requests&lt;br /&gt;
   		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;; + $body=&amp;quot;&amp;quot;; &lt;br /&gt;
   		die;&lt;br /&gt;
   	}&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
   checkHash();&lt;br /&gt;
   // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
   echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Library|Secure HTTP Post]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14724</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14724"/>
		<updated>2007-03-05T23:55:52Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page pay.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
   // this function tweak slightly urlencode to make it behave exactly like llEscapeURL in Second Life.&lt;br /&gt;
   function llEscapeURL($s)&lt;br /&gt;
   {&lt;br /&gt;
   	$s=str_replace(&lt;br /&gt;
   		array(&amp;quot; &amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
   		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
   		urlencode($s));&lt;br /&gt;
   }   &lt;br /&gt;
   &lt;br /&gt;
   // this my main SL page XML-RPC page&lt;br /&gt;
   function checkHash()&lt;br /&gt;
   {&lt;br /&gt;
   	global $body;&lt;br /&gt;
   	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
   	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
   	$cpt=0;&lt;br /&gt;
   	$SECRET_NUMBER=123456789;&lt;br /&gt;
   	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
   		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
   		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
   	}&lt;br /&gt;
   	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
   	if ($hash==$calcHash) echo &amp;quot;hash is right.&amp;quot;;&lt;br /&gt;
   	else echo &amp;quot;hash is wrong.&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
   checkHash();&lt;br /&gt;
   // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
   echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
   ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Library|Secure HTTP Post]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14723</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=14723"/>
		<updated>2007-03-05T23:52:36Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page pay.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
function llEscapeURL($s)&lt;br /&gt;
{&lt;br /&gt;
	$s=str_replace(&lt;br /&gt;
		array(&amp;quot; &amp;quot;,&amp;quot;-&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;_&amp;quot;),&lt;br /&gt;
		array(&amp;quot;%20&amp;quot;,&amp;quot;%2D&amp;quot;,&amp;quot;%2E&amp;quot;,&amp;quot;%5F&amp;quot;),&lt;br /&gt;
		urlencode($s));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// this my main SL page XML-RPC page&lt;br /&gt;
function checkHash()&lt;br /&gt;
{&lt;br /&gt;
	global $body;&lt;br /&gt;
	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
	$cpt=0;&lt;br /&gt;
	$SECRET_NUMBER=123456789;&lt;br /&gt;
	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
		$body.=llEscapeURL($name).&amp;quot;=&amp;quot;.llEscapeURL($value);&lt;br /&gt;
	}&lt;br /&gt;
	$calcHash=md5($body.&#039;:&#039;.$SECRET_NUMBER);&lt;br /&gt;
	if ($hash==$calcHash) echo &amp;quot;hash is right.&amp;quot;;&lt;br /&gt;
	else echo &amp;quot;hash is wrong.&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
checkHash();&lt;br /&gt;
// You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;br /&gt;
&lt;br /&gt;
[[Category:LSL Library|Secure HTTP Post]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10856</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10856"/>
		<updated>2007-02-19T00:00:28Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page param1.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your web server will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
  	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
  	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
  	$cpt=0;&lt;br /&gt;
  	$SECRET_NUMBER=123456789;&lt;br /&gt;
  	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
  		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
  		$body.=urlencode($name).&amp;quot;=&amp;quot;.urlencode($value);&lt;br /&gt;
  	}&lt;br /&gt;
  	$calcHash=md5(&amp;quot;$body:$SECRET_NUMBER&amp;quot;);&lt;br /&gt;
  	if ($hash!=$calcHash)&lt;br /&gt;
  	{&lt;br /&gt;
  		//sleep(2); // slow down the requests&lt;br /&gt;
  		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;;&lt;br /&gt;
  		die;&lt;br /&gt;
  	}&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10855</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10855"/>
		<updated>2007-02-18T23:59:39Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: better formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page param1.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your webbrowser will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  default&lt;br /&gt;
  {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
          xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
      http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
      {&lt;br /&gt;
          if (request_id == http_request_id)&lt;br /&gt;
          {&lt;br /&gt;
              llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  integer SECRET_NUMBER=123456789;&lt;br /&gt;
  &lt;br /&gt;
  xrequest(string url, list l)&lt;br /&gt;
  {&lt;br /&gt;
      integer i;&lt;br /&gt;
      integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
      string body;&lt;br /&gt;
  &lt;br /&gt;
     for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
     {&lt;br /&gt;
          string varname=llList2String(l,i);&lt;br /&gt;
          string varvalue=llList2String(l,i + 1);&lt;br /&gt;
          if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
          body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
      }&lt;br /&gt;
      string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
      http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  &amp;lt;?php&lt;br /&gt;
  function checkHash()&lt;br /&gt;
  {&lt;br /&gt;
  	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
  	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
  	$cpt=0;&lt;br /&gt;
  	$SECRET_NUMBER=123456789;&lt;br /&gt;
  	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
  		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
  		$body.=urlencode($name).&amp;quot;=&amp;quot;.urlencode($value);&lt;br /&gt;
  	}&lt;br /&gt;
  	$calcHash=md5(&amp;quot;$body:$SECRET_NUMBER&amp;quot;);&lt;br /&gt;
  	if ($hash!=$calcHash)&lt;br /&gt;
  	{&lt;br /&gt;
  		//sleep(2); // slow down the requests&lt;br /&gt;
  		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;;&lt;br /&gt;
  		die;&lt;br /&gt;
  	}&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  checkHash();&lt;br /&gt;
  // You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
  echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
  ?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10854</id>
		<title>HTTP Post request to a PHP server</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=HTTP_Post_request_to_a_PHP_server&amp;diff=10854"/>
		<updated>2007-02-18T23:53:37Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: first entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LSL now offer the ability to request HTTP page from any website.&lt;br /&gt;
&lt;br /&gt;
You can use different methods to access your webserver.&lt;br /&gt;
The most obvious is GET, the get method allows any number of parameters.&lt;br /&gt;
&lt;br /&gt;
The syntax is : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&lt;br /&gt;
&lt;br /&gt;
In the example above the page param1.php is requested with 2 parameters param1 and param2.&lt;br /&gt;
The issue with GET is that if someone manage to sniff or guess your webpage, he could potentially take any webbrowser and type : &lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?param1=Joe+Blog&amp;amp;amount=1000000&lt;br /&gt;
&lt;br /&gt;
And your webbrowser will have little idea that this request is bogus.&lt;br /&gt;
&lt;br /&gt;
This is where my library comes into action.&lt;br /&gt;
&lt;br /&gt;
The LSL library takes every character in your HTTP request and compute a security HashCode.&lt;br /&gt;
The library will then add this extra security hash parameter to your request like that:&lt;br /&gt;
&lt;br /&gt;
http://www.yourwebsite.com/pay.php?user=Corto+Maltese&amp;amp;amount=100&amp;amp;hash=edabcc1792b33e7d6055cc4c8e69912c&lt;br /&gt;
&lt;br /&gt;
When the server receive the request, it will be able to check that the hash provided is correct.&lt;br /&gt;
If the request was tempered, the hash will not be correct, the server will therefore ignore the request and not allow Job Blog to pretend he has paid L$ 1,000,000.&lt;br /&gt;
&lt;br /&gt;
Also the library uses a POST method, the POST method is not very different from GET but allow slightly more input parameters than GET, The POST method is also a bit more secure as the parameters do not appears in the cache statistics or similar tools.&lt;br /&gt;
&lt;br /&gt;
How to use:&lt;br /&gt;
The main LSL function is called xrequest&lt;br /&gt;
&lt;br /&gt;
   xrequest(string Url, List Parameters)&lt;br /&gt;
&lt;br /&gt;
Url : &lt;br /&gt;
   is the address of your webpage. for example &amp;quot;http://www.yoursite.com/sl.php&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Parameters :&lt;br /&gt;
   is a list of string, the list must be set in pairs using this format: &lt;br /&gt;
   [variable_name_1, variable_value_1, variable_name_2, variable_value_2, ...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the script request a page using the parameters a=1, b=2 and c=3.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        xrequest(&amp;quot;http://www.yoursite.com/sl.php&amp;quot;,[&amp;quot;a&amp;quot;,&amp;quot;1&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;3&amp;quot;]);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
    {&lt;br /&gt;
        if (request_id == http_request_id)&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code of the xrequest function.&lt;br /&gt;
Note that you should change the SECRET_NUMBER to any number of your choice but preferably something rather large and random up to 2,000,000,000.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
integer SECRET_NUMBER=123456789;&lt;br /&gt;
&lt;br /&gt;
xrequest(string url, list l)&lt;br /&gt;
{&lt;br /&gt;
    integer i;&lt;br /&gt;
    integer len=llGetListLength(l) &amp;amp; 0xFFFE; // makes the list count even&lt;br /&gt;
    string body;&lt;br /&gt;
&lt;br /&gt;
    for (i=0;i&amp;lt;len;i+=2)&lt;br /&gt;
    {&lt;br /&gt;
        string varname=llList2String(l,i);&lt;br /&gt;
        string varvalue=llList2String(l,i + 1);&lt;br /&gt;
        if (i&amp;gt;0) body+=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
        body+=llEscapeURL(varname)+&amp;quot;=&amp;quot;+llEscapeURL(varvalue);&lt;br /&gt;
    }&lt;br /&gt;
    string hash=llMD5String(body,SECRET_NUMBER);&lt;br /&gt;
    http_request_id = llHTTPRequest(url+&amp;quot;?hash=&amp;quot;+hash,[HTTP_METHOD,&amp;quot;POST&amp;quot;,HTTP_MIMETYPE,&amp;quot;application/x-www-form-urlencoded&amp;quot;],body);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the server side here is the PHP function which will allow your server to check the securty hash:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function checkHash()&lt;br /&gt;
{&lt;br /&gt;
	$hash=$_GET[&amp;quot;hash&amp;quot;];&lt;br /&gt;
	$body=&amp;quot;&amp;quot;;&lt;br /&gt;
	$cpt=0;&lt;br /&gt;
	$SECRET_NUMBER=123456789;&lt;br /&gt;
	foreach ($_POST as $name =&amp;gt; $value) {&lt;br /&gt;
		if ($cpt++&amp;gt;0) $body.=&amp;quot;&amp;amp;&amp;quot;;&lt;br /&gt;
		$body.=urlencode($name).&amp;quot;=&amp;quot;.urlencode($value);&lt;br /&gt;
	}&lt;br /&gt;
	$calcHash=md5(&amp;quot;$body:$SECRET_NUMBER&amp;quot;);&lt;br /&gt;
	if ($hash!=$calcHash)&lt;br /&gt;
	{&lt;br /&gt;
		//sleep(2); // slow down the requests&lt;br /&gt;
		echo &amp;quot;result=FAIL\nMSG=Invalid hash&amp;quot;;&lt;br /&gt;
		die;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkHash();&lt;br /&gt;
// You can use the parameters here by simply using $_POST[&amp;quot;parameter_name&amp;quot;] &lt;br /&gt;
echo &amp;quot;OK&amp;quot;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This library could be improved, to treat output parameter too.&lt;br /&gt;
It doesn&#039;t do anything in this area yet.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=10853</id>
		<title>Category:LSL Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=10853"/>
		<updated>2007-02-18T23:17:07Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: /* Rules for posting: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
==Script Library==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
There are many [[script|scripts]] that have become buried in the [http://forums.secondlife.com/forumdisplay.php?f=15 Scripting Library forum], were lost with the death of the scripting forums, or sit idle in [[inventory|inventories]] that could be useful and should be more accessible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Other scripters may be in the same situation. This wiki is a well-suited medium for a script library. Feel free to add your scripts to the script library by creating new pages for them and linking to those pages here.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules for posting: ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
#Your script must be tested and working. If it&#039;s not, stick it on your own username page until it is. This is a list of working, usable scripts.&lt;br /&gt;
#Add a link to your script&#039;s page here. Link back to this page from your script&#039;s page.&lt;br /&gt;
#Do not add scripts that duplicate the same functionality as an existing script. If yours does, explain why.&lt;br /&gt;
#Do not post simple scripts to the library. Simple scripts should be posted to the Examples list.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL_Library_Hello_Avatar|Hello Avatar]]&lt;br /&gt;
|| Linden Lab&lt;br /&gt;
|| SL&#039;s [[default]] script&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL_Library_Chat_Logger_(GPL)|Chat Logger (GPL)]]&lt;br /&gt;
|| [[User:Nobody_Fugazi|Nobody Fugazi]]&lt;br /&gt;
|| Chat logger which requests permission from participants before recording them.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Day_of_the_Week|Day of the Week]]&lt;br /&gt;
||[[User:DoteDote_Edison|DoteDote Edison]]&lt;br /&gt;
||Function to get day of the week from {{LSLG|llGetUnixTime}}.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Dialog_Module|Dialog Module]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Create and handle dialog boxes through [[link|linked]] messages.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Dialog_NumberPad|Dialog Number Pad]]&lt;br /&gt;
||[[User:DoteDote_Edison|DoteDote Edison]]&lt;br /&gt;
||Use a dialog to accept positive integer input from users.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Rotation_Functions|Experimental Rotation Math Library]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Collection of functions for working with [[rotation|rotations]].&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Float2Hex|Float2Hex]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Very useful for {{LSLG|float}}s transporting.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Pseudo-Random_Generator|Pseudo-Random Number Generator]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||For use with secure [[communications|communication]] through insecure mediums to reducing the risk of the communications protocol being hacked.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Texture_Switcher|Texture Switcher]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Texture switcher that will step through the textures in an object&#039;s inventory, displaying them on all sides of the object.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Timer_Module|Timer Module]]&lt;br /&gt;
||[[User:Isabelle_Aquitaine|Isabelle Aquitaine]]&lt;br /&gt;
||Manage multiple timers via linked messages.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Unescape|Unescape]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Unescape escape codes in strings.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Prim_Torture|Universal Prim Torture Script ]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
|| Upgradable universal prim torture script.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_XyText|XyText]]&lt;br /&gt;
||[[User:Xylor_Baysklef|Xylor Baysklef]]&lt;br /&gt;
|| Display text (up to 6 characters) on a prim&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Date_Library|Date Library]]&lt;br /&gt;
||[[User:Corto_Maltese|Corto Maltese]]&lt;br /&gt;
|| Date library, based on number of day since march 3rd 1600, can be used to calculate weekday, date differences, and date offset, and date formating.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Secure_HTTP_Post|Secure HTTP Post]]&lt;br /&gt;
||[[User:Corto_Maltese|Corto Maltese]]&lt;br /&gt;
|| This small library allow you to send Secure requests to your website with a security mecanism aimed to stop hacking.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Basic_Encryption_Modules|Basic Encryption Modules]]&lt;br /&gt;
||[[User:Beverly_Larkin|Beverly Larkin]]&lt;br /&gt;
||Basic encryption scripts, allows you to encrypt a float, and shout it to another prim on a randomly chosen channel.&lt;br /&gt;
|}&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlSitTarget&amp;diff=8234</id>
		<title>Talk:LlSitTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlSitTarget&amp;diff=8234"/>
		<updated>2007-02-03T22:45:43Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I have a feeling that llSitTarget does not work if someone is already sit on the object.&lt;br /&gt;
The second person to sit will sit in the clicked position rather than the target.&lt;br /&gt;
&lt;br /&gt;
I wanted to shift the sit target as people sit but it does not look possible.&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=8048</id>
		<title>Date Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=8048"/>
		<updated>2007-01-31T21:38:58Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These two function are directly translated from Gary Katch web site : [[http://alcor.concordia.ca/~gpkatch/]].&lt;br /&gt;
I however had to make some modifications.&lt;br /&gt;
&lt;br /&gt;
1 - I translated from C, to LSL. This was not too hard; I merely had to replace int by integer and a few more syntax differences.&lt;br /&gt;
&lt;br /&gt;
2 - I had to make the functions 32 compatible. The original function uses 64 bits integers but Second Life supports only 32 bits&lt;br /&gt;
&lt;br /&gt;
When the line &amp;quot; y = (10000*g + 14780)/3652425 &amp;quot; was run it was going over the 32 bits.&lt;br /&gt;
I solved this issue by applying and offset of 1600 years. So rather than working with the number of days since March 1st 0001, the functions origin is March 1st 1600. &lt;br /&gt;
According to my test the functions work at least from 1600 to 2181.&lt;br /&gt;
&lt;br /&gt;
3 - I added a couple of helper function.&lt;br /&gt;
----&lt;br /&gt;
The function gday fiven integer y, m, d, calculate day number g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer gday(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    // convert date to day number &lt;br /&gt;
    integer m = (mm + 9)%12; // mar=0, feb=11 &lt;br /&gt;
    integer y = yy - 1600 - m/10;   // if Jan/Feb, year-- &lt;br /&gt;
    return y*365 + y/4 - y/100 + y/400 + (m*306 + 5)/10 + (dd - 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This function does the exact opposite. Given a day number d, it returns a list containing [ year, month, day]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list sdate(integer d) &lt;br /&gt;
{&lt;br /&gt;
    // convert day number to y,m,d format &lt;br /&gt;
    integer y = (10000*d + 14780)/3652425;&lt;br /&gt;
    integer ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    if (ddd &amp;lt; 0) {&lt;br /&gt;
        y--;&lt;br /&gt;
        ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    }&lt;br /&gt;
    integer mi = (52 + 100*ddd)/3060;&lt;br /&gt;
    integer dd = ddd - (mi*306 + 5)/10 + 1;&lt;br /&gt;
    return [&lt;br /&gt;
        1600 + y + (mi + 2)/12,&lt;br /&gt;
        (mi + 2)%12 + 1,&lt;br /&gt;
        dd];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Today&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer today()&lt;br /&gt;
{&lt;br /&gt;
    string DateUTC = llGetDate();&lt;br /&gt;
    integer year = (integer)llGetSubString(DateUTC, 0, 3);&lt;br /&gt;
    integer month = (integer)llGetSubString(DateUTC, 5, 6);&lt;br /&gt;
    integer day = (integer)llGetSubString(DateUTC, 8, 9);&lt;br /&gt;
    return gday(year,month,day);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date differences. &lt;br /&gt;
The difference in days between two dates: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return gday(y2,m2,d2) - gday(y1,m1,d1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Day offsets. &lt;br /&gt;
The date n days from y,m,d:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  sdate(gday(y,m,d) + n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date legality. &lt;br /&gt;
To check if a date is on the calendar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer isLegal(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    list dt=sdate(gday(yy,mm,dd));&lt;br /&gt;
    return&lt;br /&gt;
        llList2Integer(dt,0)==yy&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,1)==mm&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,2)==dd;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Those functions are straight forward formatting function.&lt;br /&gt;
They can be adapted for the different languages and date format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list weekDays=[&amp;quot;Sun&amp;quot;,&amp;quot;Mon&amp;quot;,&amp;quot;Tue&amp;quot;,&amp;quot;Wed&amp;quot;,&amp;quot;Thu&amp;quot;,&amp;quot;Fri&amp;quot;,&amp;quot;Sat&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string weekDay(integer g)&lt;br /&gt;
{&lt;br /&gt;
    return llList2String(weekDays,(g + 3) % 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
list months=[&amp;quot;&amp;quot;,&amp;quot;January&amp;quot;,&amp;quot;February&amp;quot;,&amp;quot;March&amp;quot;,&lt;br /&gt;
    &amp;quot;April&amp;quot;,&amp;quot;May&amp;quot;,&amp;quot;June&amp;quot;,&lt;br /&gt;
    &amp;quot;July&amp;quot;,&amp;quot;August&amp;quot;,&amp;quot;September&amp;quot;,&lt;br /&gt;
    &amp;quot;October&amp;quot;,&amp;quot;November&amp;quot;,&amp;quot;December&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string fullDate(integer g)&lt;br /&gt;
{&lt;br /&gt;
    list dt = sdate(g);&lt;br /&gt;
    string nth;&lt;br /&gt;
    integer dd = llList2Integer(dt,2); // day&lt;br /&gt;
    if (dd&amp;gt;=10 &amp;amp;&amp;amp; dd&amp;lt;=20) nth=&amp;quot;th&amp;quot;;&lt;br /&gt;
    else {&lt;br /&gt;
        dd = dd % 10;&lt;br /&gt;
        if (dd==1) nth=&amp;quot;st&amp;quot;;&lt;br /&gt;
        else if (dd==2) nth=&amp;quot;nd&amp;quot;;&lt;br /&gt;
        else if (dd==3) nth=&amp;quot;rd&amp;quot;;&lt;br /&gt;
        else nth=&amp;quot;th&amp;quot;;    &lt;br /&gt;
    }&lt;br /&gt;
    return weekDay(g)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + llList2String(months,llList2Integer(dt,1)) &lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,2) + nth&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=8038</id>
		<title>Category:LSL Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category:LSL_Library&amp;diff=8038"/>
		<updated>2007-01-31T21:23:53Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
==Script Library==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
There are many [[script|scripts]] that have become buried in the [http://forums.secondlife.com/forumdisplay.php?f=15 Scripting Library forum], were lost with the death of the scripting forums, or sit idle in [[inventory|inventories]] that could be useful and should be more accessible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Other scripters may be in the same situation. This wiki is a well-suited medium for a script library. Feel free to add your scripts to the script library by creating new pages for them and linking to those pages here.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules for posting: ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
#Prefix pages for the script library with &amp;quot;&amp;lt;tt&amp;gt;LSL_Library_&amp;lt;/tt&amp;gt;&amp;quot; to keep the Wiki namespace clean. &lt;br /&gt;
#:Example: [[LSL_Library_Hello_Avatar|Hello Avatar]] -&amp;gt; [[LSL_Library_Hello_Avatar]] &lt;br /&gt;
#Your script must be tested and working. If it&#039;s not, stick it on your own username page until it is. This is a list of working, usable scripts.&lt;br /&gt;
#Add a link to your script&#039;s page here. Link back to this page from your script&#039;s page.&lt;br /&gt;
#Do not add scripts that duplicate the same functionality as an existing script. If yours does, explain why.&lt;br /&gt;
#Do not post simple scripts to the library. Simple scripts should be posted to the Examples list.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL_Library_Hello_Avatar|Hello Avatar]]&lt;br /&gt;
|| Linden Lab&lt;br /&gt;
|| SL&#039;s [[default]] script&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Day_of_the_Week|Day of the Week]]&lt;br /&gt;
||[[User:DoteDote_Edison|DoteDote Edison]]&lt;br /&gt;
||Function to get day of the week from {{LSLG|llGetUnixTime}}.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Dialog_Module|Dialog Module]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Create and handle dialog boxes through [[link|linked]] messages.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Dialog_NumberPad|Dialog Number Pad]]&lt;br /&gt;
||[[User:DoteDote_Edison|DoteDote Edison]]&lt;br /&gt;
||Use a dialog to accept positive integer input from users.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Rotation_Functions|Experimental Rotation Math Library]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Collection of functions for working with [[rotation|rotations]].&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Float2Hex|Float2Hex]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Very useful for {{LSLG|float}}s transporting.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Pseudo-Random_Generator|Pseudo-Random Number Generator]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||For use with secure [[communications|communication]] through insecure mediums to reducing the risk of the communications protocol being hacked.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Texture_Switcher|Texture Switcher]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Texture switcher that will step through the textures in an object&#039;s inventory, displaying them on all sides of the object.&lt;br /&gt;
|-&lt;br /&gt;
||[[LSL_Library_Unescape|Unescape]]&lt;br /&gt;
||[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
||Unescape escape codes in strings.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[LSL_Library_Prim_Torture|Universal Prim Torture Script ]]&lt;br /&gt;
||&lt;br /&gt;
[[User:Strife_Onizuka|Strife Onizuka]]&lt;br /&gt;
|| Upgradable universal prim torture script.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[LSL_Library_XyText|XyText]]&lt;br /&gt;
||&lt;br /&gt;
[[User:Xylor_Baysklef|Xylor Baysklef]]&lt;br /&gt;
|| Display text (up to 6 characters) on a prim&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
[[LSL_Library_Date_Library|Date Library]]&lt;br /&gt;
||&lt;br /&gt;
[[User:Corto_Maltese|Corto Maltese]]&lt;br /&gt;
|| Date library, based on number of day since march 3rd 1600, can be used to calculate weekday, date differences, and date offset, and date formating.&lt;br /&gt;
|}&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Corto_Maltese%27s_Date_and_Time_Library&amp;diff=8034</id>
		<title>Corto Maltese&#039;s Date and Time Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Corto_Maltese%27s_Date_and_Time_Library&amp;diff=8034"/>
		<updated>2007-01-31T21:18:27Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Corto Maltese&amp;#039;s Date and Time Library moved to LSL Library Date Library: Apparently this sort of pages must start with LSL_Library&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[LSL Library Date Library]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=8033</id>
		<title>Date Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=8033"/>
		<updated>2007-01-31T21:18:27Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: Corto Maltese&amp;#039;s Date and Time Library moved to LSL Library Date Library: Apparently this sort of pages must start with LSL_Library&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These two function are directly translated from Gary Katch web site : [[http://alcor.concordia.ca/~gpkatch/]].&lt;br /&gt;
I however had to make some modifications.&lt;br /&gt;
&lt;br /&gt;
1 - I translated from C, to LSL. This was not too hard; I merely had to replace int by integer and a few more syntax differences.&lt;br /&gt;
&lt;br /&gt;
2 - I had to make the functions 32 compatible. The original function uses 64 bits integers but Second Life supports only 32 bits&lt;br /&gt;
&lt;br /&gt;
When the line &amp;quot; y = (10000*g + 14780)/3652425 &amp;quot; was run it was going over the 32 bits.&lt;br /&gt;
I solved this issue by applying and offset of 1600 years. So rather than working with the number of days since March 1st 0001, the functions origin is March 1st 1600. &lt;br /&gt;
According to my test the functions work at least from 1600 to 2181.&lt;br /&gt;
&lt;br /&gt;
3 - I added a couple of helper function.&lt;br /&gt;
----&lt;br /&gt;
The function gday fiven integer y, m, d, calculate day number g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer gday(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    // convert date to day number &lt;br /&gt;
    integer m = (mm + 9)%12; // mar=0, feb=11 &lt;br /&gt;
    integer y = yy - 1600 - m/10;   // if Jan/Feb, year-- &lt;br /&gt;
    return y*365 + y/4 - y/100 + y/400 + (m*306 + 5)/10 + (dd - 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list sdate(integer d) &lt;br /&gt;
{&lt;br /&gt;
    // convert day number to y,m,d format &lt;br /&gt;
    integer y = (10000*d + 14780)/3652425;&lt;br /&gt;
    integer ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    if (ddd &amp;lt; 0) {&lt;br /&gt;
        y--;&lt;br /&gt;
        ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    }&lt;br /&gt;
    integer mi = (52 + 100*ddd)/3060;&lt;br /&gt;
    integer dd = ddd - (mi*306 + 5)/10 + 1;&lt;br /&gt;
    string nth;&lt;br /&gt;
    integer ddn = dd % 10;&lt;br /&gt;
    if (dd&amp;gt;=10 &amp;amp;&amp;amp; dd&amp;lt;=20) nth=&amp;quot;th&amp;quot;;&lt;br /&gt;
    else if (ddn==1) nth=&amp;quot;st&amp;quot;;&lt;br /&gt;
    else if (ddn==2) nth=&amp;quot;nd&amp;quot;;&lt;br /&gt;
    else if (ddn==3) nth=&amp;quot;rd&amp;quot;;&lt;br /&gt;
    else nth=&amp;quot;th&amp;quot;;    &lt;br /&gt;
    return [&lt;br /&gt;
        1600 + y + (mi + 2)/12,&lt;br /&gt;
        (mi + 2)%12 + 1,&lt;br /&gt;
        dd,&lt;br /&gt;
        nth];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Today&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer today()&lt;br /&gt;
{&lt;br /&gt;
    string DateUTC = llGetDate();&lt;br /&gt;
    integer year = (integer)llGetSubString(DateUTC, 0, 3);&lt;br /&gt;
    integer month = (integer)llGetSubString(DateUTC, 5, 6);&lt;br /&gt;
    integer day = (integer)llGetSubString(DateUTC, 8, 9);&lt;br /&gt;
    return gday(year,month,day);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date differences. &lt;br /&gt;
The difference in days between two dates: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return gday(y2,m2,d2) - gday(y1,m1,d1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Day offsets. &lt;br /&gt;
The date n days from y,m,d:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  sdate(gday(y,m,d) + n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date legality. &lt;br /&gt;
To check if a date is on the calendar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer isLegal(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    list dt=sdate(gday(yy,mm,dd));&lt;br /&gt;
    return&lt;br /&gt;
        llList2Integer(dt,0)==yy&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,1)==mm&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,2)==dd;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Those functions are straight forward formatting function.&lt;br /&gt;
They can be adapted for the different languages and date format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list weekDays=[&amp;quot;Sun&amp;quot;,&amp;quot;Mon&amp;quot;,&amp;quot;Tue&amp;quot;,&amp;quot;Wed&amp;quot;,&amp;quot;Thu&amp;quot;,&amp;quot;Fri&amp;quot;,&amp;quot;Sat&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string weekDay(integer g)&lt;br /&gt;
{&lt;br /&gt;
    return llList2String(weekDays,(g + 3) % 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
list months=[&amp;quot;&amp;quot;,&amp;quot;January&amp;quot;,&amp;quot;February&amp;quot;,&amp;quot;March&amp;quot;,&lt;br /&gt;
    &amp;quot;April&amp;quot;,&amp;quot;May&amp;quot;,&amp;quot;June&amp;quot;,&lt;br /&gt;
    &amp;quot;July&amp;quot;,&amp;quot;August&amp;quot;,&amp;quot;September&amp;quot;,&lt;br /&gt;
    &amp;quot;October&amp;quot;,&amp;quot;November&amp;quot;,&amp;quot;December&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string fullDate(integer g)&lt;br /&gt;
{&lt;br /&gt;
    list dt = sdate(g);&lt;br /&gt;
    return weekDay(g)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + llList2String(months,llList2Integer(dt,1)) &lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,2)&lt;br /&gt;
        + llList2String(dt,3)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7672</id>
		<title>Date Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7672"/>
		<updated>2007-01-28T14:36:31Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These two function are directly translated from Gary Katch web site : [[http://alcor.concordia.ca/~gpkatch/]].&lt;br /&gt;
I however had to make some modifications.&lt;br /&gt;
&lt;br /&gt;
1 - I translated from C, to LSL. This was not too hard; I merely had to replace int by integer and a few more syntax differences.&lt;br /&gt;
&lt;br /&gt;
2 - I had to make the functions 32 compatible. The original function uses 64 bits integers but Second Life supports only 32 bits&lt;br /&gt;
&lt;br /&gt;
When the line &amp;quot; y = (10000*g + 14780)/3652425 &amp;quot; was run it was going over the 32 bits.&lt;br /&gt;
I solved this issue by applying and offset of 1600 years. So rather than working with the number of days since March 1st 0001, the functions origin is March 1st 1600. &lt;br /&gt;
According to my test the functions work at least from 1600 to 2181.&lt;br /&gt;
&lt;br /&gt;
3 - I added a couple of helper function.&lt;br /&gt;
----&lt;br /&gt;
The function gday fiven integer y, m, d, calculate day number g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer gday(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    // convert date to day number &lt;br /&gt;
    integer m = (mm + 9)%12; // mar=0, feb=11 &lt;br /&gt;
    integer y = yy - 1600 - m/10;   // if Jan/Feb, year-- &lt;br /&gt;
    return y*365 + y/4 - y/100 + y/400 + (m*306 + 5)/10 + (dd - 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list sdate(integer d) &lt;br /&gt;
{&lt;br /&gt;
    // convert day number to y,m,d format &lt;br /&gt;
    integer y = (10000*d + 14780)/3652425;&lt;br /&gt;
    integer ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    if (ddd &amp;lt; 0) {&lt;br /&gt;
        y--;&lt;br /&gt;
        ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    }&lt;br /&gt;
    integer mi = (52 + 100*ddd)/3060;&lt;br /&gt;
    integer dd = ddd - (mi*306 + 5)/10 + 1;&lt;br /&gt;
    string nth;&lt;br /&gt;
    integer ddn = dd % 10;&lt;br /&gt;
    if (dd&amp;gt;=10 &amp;amp;&amp;amp; dd&amp;lt;=20) nth=&amp;quot;th&amp;quot;;&lt;br /&gt;
    else if (ddn==1) nth=&amp;quot;st&amp;quot;;&lt;br /&gt;
    else if (ddn==2) nth=&amp;quot;nd&amp;quot;;&lt;br /&gt;
    else if (ddn==3) nth=&amp;quot;rd&amp;quot;;&lt;br /&gt;
    else nth=&amp;quot;th&amp;quot;;    &lt;br /&gt;
    return [&lt;br /&gt;
        1600 + y + (mi + 2)/12,&lt;br /&gt;
        (mi + 2)%12 + 1,&lt;br /&gt;
        dd,&lt;br /&gt;
        nth];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Today&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer today()&lt;br /&gt;
{&lt;br /&gt;
    string DateUTC = llGetDate();&lt;br /&gt;
    integer year = (integer)llGetSubString(DateUTC, 0, 3);&lt;br /&gt;
    integer month = (integer)llGetSubString(DateUTC, 5, 6);&lt;br /&gt;
    integer day = (integer)llGetSubString(DateUTC, 8, 9);&lt;br /&gt;
    return gday(year,month,day);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date differences. &lt;br /&gt;
The difference in days between two dates: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return gday(y2,m2,d2) - gday(y1,m1,d1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Day offsets. &lt;br /&gt;
The date n days from y,m,d:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  sdate(gday(y,m,d) + n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date legality. &lt;br /&gt;
To check if a date is on the calendar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer isLegal(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    list dt=sdate(gday(yy,mm,dd));&lt;br /&gt;
    return&lt;br /&gt;
        llList2Integer(dt,0)==yy&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,1)==mm&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,2)==dd;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Those functions are straight forward formatting function.&lt;br /&gt;
They can be adapted for the different languages and date format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list weekDays=[&amp;quot;Sun&amp;quot;,&amp;quot;Mon&amp;quot;,&amp;quot;Tue&amp;quot;,&amp;quot;Wed&amp;quot;,&amp;quot;Thu&amp;quot;,&amp;quot;Fri&amp;quot;,&amp;quot;Sat&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string weekDay(integer g)&lt;br /&gt;
{&lt;br /&gt;
    return llList2String(weekDays,(g + 3) % 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
list months=[&amp;quot;&amp;quot;,&amp;quot;January&amp;quot;,&amp;quot;February&amp;quot;,&amp;quot;March&amp;quot;,&lt;br /&gt;
    &amp;quot;April&amp;quot;,&amp;quot;May&amp;quot;,&amp;quot;June&amp;quot;,&lt;br /&gt;
    &amp;quot;July&amp;quot;,&amp;quot;August&amp;quot;,&amp;quot;September&amp;quot;,&lt;br /&gt;
    &amp;quot;October&amp;quot;,&amp;quot;November&amp;quot;,&amp;quot;December&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string fullDate(integer g)&lt;br /&gt;
{&lt;br /&gt;
    list dt = sdate(g);&lt;br /&gt;
    return weekDay(g)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + llList2String(months,llList2Integer(dt,1)) &lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,2)&lt;br /&gt;
        + llList2String(dt,3)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7671</id>
		<title>Date Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7671"/>
		<updated>2007-01-28T14:35:41Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These two function are directly translated from Gary Katch web site : [[http://alcor.concordia.ca/~gpkatch/]].&lt;br /&gt;
I however had to make some modifications.&lt;br /&gt;
&lt;br /&gt;
1 - I translated from C, to LSL. This was easy, I was merely replacing int by integer and a few more syntax differences.&lt;br /&gt;
&lt;br /&gt;
2 - I had to make the functions 32 compatible. The original function uses 64 bits integers but Second Life supports only 32 bits&lt;br /&gt;
&lt;br /&gt;
When the line &amp;quot; y = (10000*g + 14780)/3652425 &amp;quot; was run it was going over the 32 bits.&lt;br /&gt;
I solved this issue by applying and offset of 1600 years. So rather than working with the number of days since March 1st 0001, the functions origin is March 1st 1600. &lt;br /&gt;
According to my test the functions work at least from 1600 to 2181.&lt;br /&gt;
&lt;br /&gt;
3 - I added a couple of helper function.&lt;br /&gt;
----&lt;br /&gt;
The function gday fiven integer y, m, d, calculate day number g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer gday(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    // convert date to day number &lt;br /&gt;
    integer m = (mm + 9)%12; // mar=0, feb=11 &lt;br /&gt;
    integer y = yy - 1600 - m/10;   // if Jan/Feb, year-- &lt;br /&gt;
    return y*365 + y/4 - y/100 + y/400 + (m*306 + 5)/10 + (dd - 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list sdate(integer d) &lt;br /&gt;
{&lt;br /&gt;
    // convert day number to y,m,d format &lt;br /&gt;
    integer y = (10000*d + 14780)/3652425;&lt;br /&gt;
    integer ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    if (ddd &amp;lt; 0) {&lt;br /&gt;
        y--;&lt;br /&gt;
        ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    }&lt;br /&gt;
    integer mi = (52 + 100*ddd)/3060;&lt;br /&gt;
    integer dd = ddd - (mi*306 + 5)/10 + 1;&lt;br /&gt;
    string nth;&lt;br /&gt;
    integer ddn = dd % 10;&lt;br /&gt;
    if (dd&amp;gt;=10 &amp;amp;&amp;amp; dd&amp;lt;=20) nth=&amp;quot;th&amp;quot;;&lt;br /&gt;
    else if (ddn==1) nth=&amp;quot;st&amp;quot;;&lt;br /&gt;
    else if (ddn==2) nth=&amp;quot;nd&amp;quot;;&lt;br /&gt;
    else if (ddn==3) nth=&amp;quot;rd&amp;quot;;&lt;br /&gt;
    else nth=&amp;quot;th&amp;quot;;    &lt;br /&gt;
    return [&lt;br /&gt;
        1600 + y + (mi + 2)/12,&lt;br /&gt;
        (mi + 2)%12 + 1,&lt;br /&gt;
        dd,&lt;br /&gt;
        nth];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Today&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer today()&lt;br /&gt;
{&lt;br /&gt;
    string DateUTC = llGetDate();&lt;br /&gt;
    integer year = (integer)llGetSubString(DateUTC, 0, 3);&lt;br /&gt;
    integer month = (integer)llGetSubString(DateUTC, 5, 6);&lt;br /&gt;
    integer day = (integer)llGetSubString(DateUTC, 8, 9);&lt;br /&gt;
    return gday(year,month,day);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date differences. &lt;br /&gt;
The difference in days between two dates: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return gday(y2,m2,d2) - gday(y1,m1,d1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Day offsets. &lt;br /&gt;
The date n days from y,m,d:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  sdate(gday(y,m,d) + n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date legality. &lt;br /&gt;
To check if a date is on the calendar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer isLegal(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    list dt=sdate(gday(yy,mm,dd));&lt;br /&gt;
    return&lt;br /&gt;
        llList2Integer(dt,0)==yy&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,1)==mm&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,2)==dd;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Those functions are straight forward formatting function.&lt;br /&gt;
They can be adapted for the different languages and date format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list weekDays=[&amp;quot;Sun&amp;quot;,&amp;quot;Mon&amp;quot;,&amp;quot;Tue&amp;quot;,&amp;quot;Wed&amp;quot;,&amp;quot;Thu&amp;quot;,&amp;quot;Fri&amp;quot;,&amp;quot;Sat&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string weekDay(integer g)&lt;br /&gt;
{&lt;br /&gt;
    return llList2String(weekDays,(g + 3) % 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
list months=[&amp;quot;&amp;quot;,&amp;quot;January&amp;quot;,&amp;quot;February&amp;quot;,&amp;quot;March&amp;quot;,&lt;br /&gt;
    &amp;quot;April&amp;quot;,&amp;quot;May&amp;quot;,&amp;quot;June&amp;quot;,&lt;br /&gt;
    &amp;quot;July&amp;quot;,&amp;quot;August&amp;quot;,&amp;quot;September&amp;quot;,&lt;br /&gt;
    &amp;quot;October&amp;quot;,&amp;quot;November&amp;quot;,&amp;quot;December&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string fullDate(integer g)&lt;br /&gt;
{&lt;br /&gt;
    list dt = sdate(g);&lt;br /&gt;
    return weekDay(g)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + llList2String(months,llList2Integer(dt,1)) &lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,2)&lt;br /&gt;
        + llList2String(dt,3)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7663</id>
		<title>Date Library</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Date_Library&amp;diff=7663"/>
		<updated>2007-01-28T14:14:22Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These two function are directly translated from Gary Katch web site : [[http://alcor.concordia.ca/~gpkatch/]].&lt;br /&gt;
I however had to make some modifications.&lt;br /&gt;
&lt;br /&gt;
1 - I translated from C, to LSL. This was easy, is merely replacing int by integer.&lt;br /&gt;
&lt;br /&gt;
2 - I had to make the functions 32 compatible. The original function uses 64 bits integers but Second Life supports only 32 bits&lt;br /&gt;
&lt;br /&gt;
When the line &amp;quot; y = (10000*g + 14780)/3652425 &amp;quot; was run it was going over the 32 bits.&lt;br /&gt;
I solved this issue by applying and offset of 1600 years. So rather than working with the number of days since March 1st 0001, the functions origin is March 1st 1600. &lt;br /&gt;
According to my test the functions work at least from 1600 to 2181.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The function gday fiven integer y, m, d, calculate day number g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer gday(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    // convert date to day number &lt;br /&gt;
    integer m = (mm + 9)%12; // mar=0, feb=11 &lt;br /&gt;
    integer y = yy - 1600 - m/10;   // if Jan/Feb, year-- &lt;br /&gt;
    return y*365 + y/4 - y/100 + y/400 + (m*306 + 5)/10 + (dd - 1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list sdate(integer d) &lt;br /&gt;
{&lt;br /&gt;
    // convert day number to y,m,d format &lt;br /&gt;
    integer y = (10000*d + 14780)/3652425;&lt;br /&gt;
    integer ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    if (ddd &amp;lt; 0) {&lt;br /&gt;
        y--;&lt;br /&gt;
        ddd = d - (y*365 + y/4 - y/100 + y/400);&lt;br /&gt;
    }&lt;br /&gt;
    integer mi = (52 + 100*ddd)/3060;&lt;br /&gt;
    integer dd = ddd - (mi*306 + 5)/10 + 1;&lt;br /&gt;
    string nth;&lt;br /&gt;
    integer ddn = dd % 10;&lt;br /&gt;
    if (dd&amp;gt;=10 &amp;amp;&amp;amp; dd&amp;lt;=20) nth=&amp;quot;th&amp;quot;;&lt;br /&gt;
    else if (ddn==1) nth=&amp;quot;st&amp;quot;;&lt;br /&gt;
    else if (ddn==2) nth=&amp;quot;nd&amp;quot;;&lt;br /&gt;
    else if (ddn==3) nth=&amp;quot;rd&amp;quot;;&lt;br /&gt;
    else nth=&amp;quot;th&amp;quot;;    &lt;br /&gt;
    return [&lt;br /&gt;
        1600 + y + (mi + 2)/12,&lt;br /&gt;
        (mi + 2)%12 + 1,&lt;br /&gt;
        dd,&lt;br /&gt;
        nth];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Today&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer today()&lt;br /&gt;
{&lt;br /&gt;
    string DateUTC = llGetDate();&lt;br /&gt;
    integer year = (integer)llGetSubString(DateUTC, 0, 3);&lt;br /&gt;
    integer month = (integer)llGetSubString(DateUTC, 5, 6);&lt;br /&gt;
    integer day = (integer)llGetSubString(DateUTC, 8, 9);&lt;br /&gt;
    return gday(year,month,day);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date differences. &lt;br /&gt;
The difference in days between two dates: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return gday(y2,m2,d2) - gday(y1,m1,d1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Day offsets. &lt;br /&gt;
The date n days from y,m,d:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  sdate(gday(y,m,d) + n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Date legality. &lt;br /&gt;
To check if a date is on the calendar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer isLegal(integer yy, integer mm, integer dd)&lt;br /&gt;
{&lt;br /&gt;
    list dt=sdate(gday(yy,mm,dd));&lt;br /&gt;
    return&lt;br /&gt;
        llList2Integer(dt,0)==yy&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,1)==mm&lt;br /&gt;
        &amp;amp;&amp;amp; llList2Integer(dt,2)==dd;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Those functions are straight forward formatting function.&lt;br /&gt;
They can be adapted for the different languages and date format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
list weekDays=[&amp;quot;Sun&amp;quot;,&amp;quot;Mon&amp;quot;,&amp;quot;Tue&amp;quot;,&amp;quot;Wed&amp;quot;,&amp;quot;Thu&amp;quot;,&amp;quot;Fri&amp;quot;,&amp;quot;Sat&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string weekDay(integer g)&lt;br /&gt;
{&lt;br /&gt;
    return llList2String(weekDays,(g + 3) % 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
list months=[&amp;quot;&amp;quot;,&amp;quot;January&amp;quot;,&amp;quot;February&amp;quot;,&amp;quot;March&amp;quot;,&lt;br /&gt;
    &amp;quot;April&amp;quot;,&amp;quot;May&amp;quot;,&amp;quot;June&amp;quot;,&lt;br /&gt;
    &amp;quot;July&amp;quot;,&amp;quot;August&amp;quot;,&amp;quot;September&amp;quot;,&lt;br /&gt;
    &amp;quot;October&amp;quot;,&amp;quot;November&amp;quot;,&amp;quot;December&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
string fullDate(integer g)&lt;br /&gt;
{&lt;br /&gt;
    list dt = sdate(g);&lt;br /&gt;
    return weekDay(g)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + llList2String(months,llList2Integer(dt,1)) &lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,2)&lt;br /&gt;
        + llList2String(dt,3)&lt;br /&gt;
        + &amp;quot; &amp;quot;&lt;br /&gt;
        + (string) llList2Integer(dt,0);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=7582</id>
		<title>User:Corto Maltese</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Corto_Maltese&amp;diff=7582"/>
		<updated>2007-01-28T12:20:40Z</updated>

		<summary type="html">&lt;p&gt;Corto Maltese: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name in SL is Corto Maltese.&lt;br /&gt;
In SL am mainly a scripter and I like to design games.&lt;br /&gt;
&lt;br /&gt;
I post here my own scripts, scripts I update to suit my own use, or answer to question I am asked.&lt;br /&gt;
&lt;br /&gt;
[[Corto Maltese&#039;s Date and Time Library]]&lt;/div&gt;</summary>
		<author><name>Corto Maltese</name></author>
	</entry>
</feed>