Name2Key Controller

Thread Started By boogaloo

2347
0
  • 54 Vote(s) - 3.15 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
PHP Code:
/*
W-Hat presents...
Name2Key Controller
Tags: chat, communications, http, link, xml-rpc, featured, controllers
Description: 
License:
None
http://secondlife.coolminds.org
*/

integer CONTROLLER 1000;
string URL   "http://w-hat.com/name2key"// name2key url
key    reqid;                               // http request id

// ------------------------------------------------

string Name;

default
{
    
link_messageinteger _sninteger _nstring _mkey _k )
    {
        if ( 
_n == CONTROLLER )
        {
            
Name _m;
            
reqid llHTTPRequestURL "?terse=1&name=" +
                                   
llEscapeURL(Name), [], "" );
        }
    }

    
http_response(key idinteger status, list metastring body) {
        if ( 
id != reqid )
            return;
        if ( 
status == 499 )
            
llOwnerSay("name2key request timed out");
        else if ( 
status != 200 )
            
llOwnerSay("the internet exploded!!");
        else if ( (
key)body == NULL_KEY )
            
llOwnerSay("No key found for " Name);
        else
            
llOwnerSay(Name "'s key is: " body );
    }

Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Radar OwnerSay Controller boogaloo 0 3,011 02-18-2013, 09:31 PM
Last Post: boogaloo

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...