User:SignpostMarv Martin/LSL/SL NTPoHTTP v1.1 client

From Second Life Wiki
< User:SignpostMarv Martin
Revision as of 18:03, 24 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
key http_id;
string timezone = "America/Los_Angeles"; // See http://uk.php.net/manual/en/timezones.php 
                                         // for full list of supported timezones.
string format = "llGetWallClock"; // "llGetWallClock", "RFC 2822" and "ISO 8601" 
                                  // are the supported formats.
default
{
    state_entry()
    {
        http_id = llHTTPRequest("http://services.slopenid.net/SLNTPoHTTP/" + llEscapeURL(format) + "/" 
+ (string)llGetUnixTime() + "/" + timezone + "/",[],"");
    }
    http_response(key q,integer s,list m,string r)
    {
        if(q == http_id)
        {
            llOwnerSay(r);
        }
    }
}