Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key uuid = "a9ba2797-81af-429d-9833-51127ad5593c"; // the uuid you want to check is a valid avatar, group or place
- string api = " http://world.secondlife.com/resident/";
- // To check uuid is a valid group use:
- // string api = " http://world.secondlife.com/group/";
- // To check uuid is a valid destination in SL use:
- // string api = " http://world.secondlife.com/place/";
- key reqID;
- default
- {
- state_entry()
- {
- reqID = llHTTPRequest(api+(string)uuid,[HTTP_METHOD,"POST"],"check");
- }
- http_response(key request, integer status, list metadata, string body)
- {
- if(request == reqID)
- {
- integer title = llSubStringIndex(body,"<title>"); // only a valid uuid contains a <title> meta tag
- // an invalid uuid contains an h3 metatag ie: <h3>Page Not Found</h3>
- if(title != -1)
- {
- llOwnerSay("UUID is an avatar!"); //or
- // llOwnerSay("UUID is a group!"); //or
- //llOwnerSay("UUID is a place!");
- }
- else
- {
- llOwnerSay("UUID is invalid! UUID is not an avatar."); //or
- //llOwnerSay("UUID is invalid! UUID is not a group."); //or
- //llOwnerSay("UUID is invalid! UUID is not a place."); //or
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment