Jump to content

question for web media


MrSndbad
 Share

You are about to reply to a thread that has been inactive for 2680 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

thank you for awnser 

ok 

for example 

i load in secondlife googel web

and in google web there is text lins in it

i need say line one from google web in localchat 

same line take it form google and say it in secondlife

this just example .

i hope you get it

Link to comment
Share on other sites

I'm not completely sure we're yet understanding exactly what you're trying to do; it may be that the "web media" thing isn't germane, but rather all that's needed may be parsing the results of a query with llHTTPRequest and dumping an extract into local chat. That's very different from needing to show the web content on a prim surface, which is what "web media" suggests.

Link to comment
Share on other sites

  • 2 weeks later...

this exactly what i want

key http_request_id; default{    state_entry()    {        http_request_id = llHTTPRequest("url", [], "");    }     http_response(key request_id, integer status, list metadata, string body)    {        if (request_id != http_request_id) return;// exit if unknown         vector COLOR_BLUE = <0.0, 0.0, 1.0>;        float  OPAQUE     = 1.0;         llSetText(body, COLOR_BLUE, OPAQUE);    }}

but the problem not give me full web 

part of the text is missing

Link to comment
Share on other sites

Read the rest of the wiki page where you got that example.   Specifically, look at the note that says

" The response body is limited to 2048 bytes by default, see HTTP_BODY_MAXLENGTH above to increase it. If the response is longer, it will be truncated."

So ....

        http_request_id = llHTTPRequest("url", [HTTP_BODY_MAXLENGTH,16384], "");

Remember too, of course, that there's a limit to the size of hover text.  So, if you are using llSetText, text is limited to 254 bytes (compare Limits#Building), if the string is longer it will be truncated to 254 bytes, even if that means the truncation will chop a character in half.  That means you may need to do some judicious pruning of the body that is returned in the http_response event before you try to display it.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2680 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...