Jump to content

Search the Community

Showing results for tags 'http_response'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education and Nonprofits
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests, Events & Challenges
    • Challenges
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land
  • Community News

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 2 results

  1. can anyone help me with a HTTP request to take information from a website to display the grid status into a prim?
  2. Hi so I've never posted here before but I've made a few scripts in the past (though not for about 2 years, so I'm a bit out of practice!) Anyway, I've been trying to update an old HUD of mine which can scan a region as one of its functions, and return a list of names plus how far away the avi is - eg: Emilee Edenflower [96m] What I want to do now is add the group name of the detect avi to that output. I've pieced together a script (from various other topics on this forum, so it probably needs tidying up later!) which can get the group name from someone clicking on an item, which is all good and well if I just want to print out info into chat. But what I can't seem to figure out is how to get the variables made in http_response back into other output. Here's my script so far (for just detecting group names). You'll see at the end, http_response makes a variable called groupname which is output via llSay and llSetText. But I want to be able to use this variable elsewhere in the script. Is it possible to create a function I can pass the URL and group UUID to which contains the http_response and return the groupname as the functions return value and assign it to a variable to be use within other strings? // Get the active group from the avatar specified by inAvatar. // return the group key, a NULL_KEY is returned if the group // cannot be determined key getAvatarGroup (key inAvatar) { key result = NULL_KEY; // get the the list of attachments for the avatar list parts = llGetAttachedList (inAvatar); if (llGetListLength (parts) > 0) { // If the avatar has any attachments then just get the // group key for the first attachment. list parts2 = llGetObjectDetails (llList2Key (parts, 0), [OBJECT_GROUP]); result = llList2Key (parts2, 0); } return (result); } string groupname; // ------------------------------------------ default { touch_start (integer total_number) { key av = llDetectedKey (0); key groupId = getAvatarGroup (av); //list dets = llGetObjectDetails(llGetKey(),[OBJECT_GROUP]); //key uuid = llList2Key(dets,0); string url = "http://world.secondlife.com/group/"+(string)groupId; //llInstantMessage (av, "group = " + (string) groupId); llSay(0,llGetDisplayName(llDetectedKey(0)) + " is in the group..."); llHTTPRequest(url,[],""); llReleaseURL(url); llSay(0,groupname); } state_entry() { //604f9b3c-a72f-a7a1-421a-3f5d83037218 -> Xoco Reborn (2) llSetText("Touch me!",<255,255,255>,1.0); } http_response(key id, integer status, list data, string body) { list parsed = llParseString2List(body,["<title>","</title>"],[]); string groupname = llList2String(parsed,1); list parsedname = llParseString2List(groupname,[],["&lt;","&rt;","&quote;","&amp;","&cent;","&pound;","&yen;","&eu;","&copy;","&reg;"]); integer len = llGetListLength(parsedname); integer i; list replace = ["&lt;","<","&rt;",">","&quote;","\"","&amp;","&","&cent;","¢","&pound;","£","&yen;","¥","&euro;","€","&copy;","©","&reg;","®"]; for(i = 0;i < len;i++) { string substring = llList2String(parsedname,i); integer idx = llListFindList(replace,[substring]); if(~idx && !(idx%2)) { parsedname = llListReplaceList(parsedname,llList2List(replace,idx+1,idx+1),i,i); } } groupname = llDumpList2String(parsedname,""); llSetText("Last group detected: "+groupname,<255,255,255>,1.0); llSay(0,groupname); } }
×
×
  • Create New...