Difference between revisions of "LlGetHTTPServerURL"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LSL_Function|func_id
{{#vardefine:gr_text|This was implemented as [[llRequestURL]] and [[llRequestSecureURL]].}}{{LSL_Function|func_id
|mode=request
|mode=request
|func=llGetHTTPServerURL
|func=llGetHTTPServerURL
|func_sleep=0.5
|func_sleep=0.0
|func_energy=10.0
|func_energy=10.0
|sort=GetHTTPServerURL
|sort=GetHTTPServerURL
|return_type=string
|return_type=string
|return_text= that is a URL identifying the HTTP server.
|return_text= that is a URL identifying the HTTP server if active, empty string otherwise.
|func_desc=Returns the current HTTP server URL for the prim the script is calling the function in.
|func_desc=Returns the current HTTP server URL for the script calling the function.
|func_footer=Returned URI: <nowiki>http://sim###.agni:portofsimulator/uuid</nowiki><br /><nowiki>Ex: http://sim4212.agni:1337/00000000-0000-0000-0000-000000000000</nowiki>
|func_footer=Returned URI: <nowiki>http://sim###.agni.lindenlab.com:portofsimulator/uuid</nowiki><br /><nowiki>Ex: http://sim4212.agni.lindenlab.com:1337/00000000-0000-0000-0000-000000000000</nowiki>
|caveats=
|caveats=
|examples=<pre>string ServerUrl = "";
|examples=<pre>
 
default
default
{
{
     changed(integer change)
     touch_start(integer t) // Touch Indicator
     {
     {
         if (change & CHANGED_REGION)
        string ServerURL = llGetHTTPServerURL();
         if (ServerURL != "")
        {
            llOwnerSay("HTTP Server URL:" + ServerURL);
        }
        else
         {
         {
             ServerURL = llGetHTTPServerURL();
             llOwnerSay("HTTP Server Is Not Active!");
         }
         }
     }
     }
Line 28: Line 32:
|also_events={{LSL DefineRow||[[http_request]]}}
|also_events={{LSL DefineRow||[[http_request]]}}
|also_functions={{LSL DefineRow||[[llHTTPServer]]|For opening an llHTTPServer.}}
|also_functions={{LSL DefineRow||[[llHTTPServer]]|For opening an llHTTPServer.}}
{{LSL DefineRow||[[llHTTPServerRemove]]|For removing the current HTTP server from a prim.}}
{{LSL DefineRow||[[llHTTPServerRemove]]|For removing the current HTTP server from the script.}}
{{LSL DefineRow||[[llHTTPResponse]]|For replying to HTTP requests.}}
{{LSL DefineRow||[[llHTTPResponse]]|For replying to HTTP requests.}}
{{LSL DefineRow||[[llEscapeURL]]}}
{{LSL DefineRow||[[llEscapeURL]]}}
{{LSL DefineRow||[[llUnescapeURL]]}}
{{LSL DefineRow||[[llUnescapeURL]]}}
|also_footer
|also_footer
|notes=Zero Linden's Office Hours Discussion On Incoming HTTP: [https://wiki.secondlife.com/wiki/User:Zero_Linden/Office_Hours/Discussion#Incoming_HTTP]<br />PJIRA feature request at [http://jira.secondlife.com/browse/SVC-913 SVC-913]<br />Please go vote if this feature is important to you.
|notes=[[User:Zero Linden/Office Hours/Discussion#Incoming HTTP|Zero Linden's Office Hours Discussion On Incoming HTTP]]
 
PJIRA feature requests:
*{{Jira|SVC-913}}
*{{Jira|SVC-1086}}
Please go vote if this feature is important to you.
|cat1
}}
}}

Latest revision as of 19:37, 3 May 2009

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

This was implemented as llRequestURL and llRequestSecureURL.

Summary

Function: string llGetHTTPServerURL( );
REQUEST Function ID
0.0 Forced Delay
10.0 Energy

Returns the current HTTP server URL for the script calling the function.
Returns a string that is a URL identifying the HTTP server if active, empty string otherwise.

Returned URI: http://sim###.agni.lindenlab.com:portofsimulator/uuid
Ex: http://sim4212.agni.lindenlab.com:1337/00000000-0000-0000-0000-000000000000

Examples

default
{
    touch_start(integer t) // Touch Indicator
    {
        string ServerURL = llGetHTTPServerURL();
        if (ServerURL != "")
        {
            llOwnerSay("HTTP Server URL:" + ServerURL);
        }
        else
        {
            llOwnerSay("HTTP Server Is Not Active!");
        }
    }
}

Notes

Zero Linden's Office Hours Discussion On Incoming HTTP

PJIRA feature requests:

Please go vote if this feature is important to you.

See Also

Events

•  http_request

Functions

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

Deep Notes

Search JIRA for related Issues

Signature

//function string llGetHTTPServerURL();