Quick and Dirty Web Page Viewer for Second Life

|

Inspired by Jeff Barr's experiments and investigations into HTML on a prim in Second Life, I threw together a quick hack to view web pages following the method he suggested at last year. Here's a more detailed recipe for doing this:

Setup:

  1. I set up a free WebThumb account. You give it an URL, it renders a picture of the web page.
  2. I installed some PHP code on my server, courtesy of Hasin Hayder, that will listen for a POSTed URL, send it to the WebThumb service, wait for the rendering, and return the URL to the thumbnail. If you install this code on your server, edit it it with your WebThumb account key.
  3. I wrote some LSL (see attached) that you can drop into an object that's textured with the parcel's media texture. Your object listen on chat channel 4 for a URL to view. When it hears an URL, it will submit it to your WebThumb service, wait for a reply, and set the parcel's media URL to the returned web page image.

That's it!

If you're going to try this at home, you either need to own the parcel under your feet, or the parcel needs to belong to a group you are in, and the viewer object needs to be deeded to the group. You can also get fancy and set the web page image to be different for each avatar who speaks to it, using the PARCEL_MEDIA_COMMAND_AGENT flag in llParcelMediaCommandList().  If you really get ambitious, have your server also scan your page for links and throw them up as a dialog...

AttachmentSize
sl-webthumb.txt1.17 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Q and D web page viewer

Cool - I can't wait to see this in-world!

Extremely clever, and

Extremely clever, and although I don't understand a word of the how-to, it seems simple enough that I can ask a co-owner to do it. Thanks!

Post new comment

The content of this field is kept private and will not be shown publicly.

Captcha Image: you will need to recognize the text in it.
Please type in the letters/numbers that are shown in the image above.