Talk:LlHTTPRequest

From Second Life Wiki
Revision as of 01:52, 9 May 2007 by Zeb Wyler (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Headers

The following headers will be present, usable by scripts running on the HTTP server if the scripting language allows you to access the headers.

HTTP_X_SECONDLIFE_SHARD
The environment the object is in. "Production" is the main grid, don't know the value for the beta grid.
Eg: Production

HTTP_X_SECONDLIFE_OBJECT_NAME
The name of the object the script is in
Eg: Object

HTTP_X_SECONDLIFE_OBJECT_KEY
The key of the object the script is in
Eg: 01234567-89ab-cdef-0123456789abcdef0

HTTP_X_SECONDLIFE_REGION
The name of the region the object is at, along with two number (coordinates of the sim?)
Eg: Jin Ho (264448, 233984)

HTTP_X_SECONDLIFE_LOCAL_POSITION
The position the object has in a region
Eg: (173.009827, 75.551231, 60.950001)

HTTP_X_SECONDLIFE_LOCAL_ROTATION
The rotation of the object
Eg: 0.000000, 0.000000, 0.000000, 1.000000

HTTP_X_SECONDLIFE_LOCAL_VELOCITY
The velocity of the object
Eg: 0.000000, 0.000000, 0.000000

HTTP_X_SECONDLIFE_OWNER_NAME
Name of the owner of the object
Eg: Zeb Wyler

HTTP_X_SECONDLIFE_OWNER_KEY
Key of the owner of the object
Eg: 01234567-89ab-cdef-0123456789abcdef0


An PHP example on how to check to see if the call came from the main grid:

<?php
    if ($_SERVER["HTTP_X_SECONDLIFE_SHARD"] == "Production") {
        echo 'You are using the main grid';
    } else {
        echo 'You are not using the main grid';
    }
?>