All pastes #1336742 Raw Edit

Someone

public cpp v1 · immutable
#1336742 ·published 2009-02-14 04:33 UTC
rendered paste body
string a;string b;key http_request_id;string url = "http://open.myartsonline.com/http-in/update.php?q=";default{    state_entry()    {        llRequestURL();         }     http_request(key id, string method, string body)    {        if (method == URL_REQUEST_GRANTED)        {            a = body;            llOwnerSay("MY URL: " + a);            http_request_id = llHTTPRequest(url+a, [], "");                     }        else if (method == URL_REQUEST_DENIED)        {            llOwnerSay("Something went wrong, no url. " + body);        }        else if (method == "GET")        {            llHTTPResponse(id,200,"Hello World!");            b = llGetHTTPHeader(id, "user-agent");            llOwnerSay("USER AGENT: " + b);        }        else        {            llHTTPResponse(id,405,"Unsupported Method");        }    }    touch_start(integer total_number)    {        llOwnerSay("MY URL: " + a);        http_request_id = llHTTPRequest(url+a, [], "");               }        http_response(key request_id, integer status, list metadata, string body)    {        if (request_id == http_request_id)        {            llInstantMessage(llGetOwner(), body);        }    }        }