Change font size
It is currently Fri Aug 17, 2018 7:44 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 7 posts ]
Author Message
 Post subject: Request a Website on a prim.
PostPosted: Sat Mar 08, 2008 7:28 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
{L_CODE}:
default {
    state_entry() {
        llListen(5, "", NULL_KEY, "");
        llSetText("says '/5 http://somesite.com' to see a web site on this prim", <1,1,1>,1);

    }
    listen(integer ch, string name, key id, string url) {
        string  dynamicID="";
        integer refreshRate = 600;
        string  contentType="image";
        string srcURL = "http://icf.de/cgi-bin/slweb2?url=" + url;
        string URLTexture = osSetDynamicTextureURL(dynamicID,
                    contentType, srcURL, "", 600);
        if (llStringLength(URLTexture)>0) {
            llSetTexture(URLTexture, ALL_SIDES);
        }
    }
}


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Mon Jun 25, 2012 9:31 pm 
Furious Typer

Joined: Fri May 11, 2012 9:37 pm
Posts: 51
Location: Canada
Just a heads up to save someone else some hair pulling.

http://icf.de caches the textures it creates. This is fine for static pages; yet if one is accessing a dynamic page it will not be updated.

eg. Say you are calling a cgi to list regions like in my case....

http://trollkeep.com/cgi-bin/opensim/OSGridWordSearchv.0001.pl?search_str=shop:1:10:UUIDofObject

Then the next time that same url is submitted the same texture is sent back even if the results of the search have changed.

- Nova

[ Edit : One fix will be to add some random UUID like ending to the search_str to make it different each time. ]


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Tue Jun 26, 2012 8:37 pm 
Furious Typer
User avatar

Joined: Mon Apr 25, 2011 6:48 pm
Posts: 186
Location: OSgrid, of course!
Neb,

Great script!!!

I tried this script, and came across a couple of issues not related to what Nova has posted.

First, when calling llSetTexture, I changed the ALL_SIDES switch to a single face, as it didn't make much sense to have a box prim with all sides as a web page. I noticed, that when I did this, llSetTexture continued to set the texture for all sides except for the side I specified. I fixed the issue by calling llSetTexture 5 more times, setting the the other sides to blank, and leaving the ALL_SIDES switch in place.

Secondly, and perhaps more important, is that the call to an "unknown" URL bugs me. I can certainly appreciate web on a prim, but having all my web requests going through an "unknown" website is what troubles me, especially in light of what Nova posted about all the image textures getting cached. This is a potential security risk.

Would you be willing to post the CGI or PHP that does the behind the scenes work as well?

Thanks
Shad MOrdre


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Wed Jun 27, 2012 8:57 am 
Furious Typer

Joined: Fri May 11, 2012 9:37 pm
Posts: 51
Location: Canada
Hi Shad,

The system behind the curtain is really a mirrored network of http://net.picidae.net/; with http://icf.de acting as a mirror. You can set up your own private mirror if you want.

- Nova


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Wed Jun 27, 2012 12:27 pm 
Furious Typer
User avatar

Joined: Mon Apr 25, 2011 6:48 pm
Posts: 186
Location: OSgrid, of course!
Nova,

Thanks for the tip. I'll look into that website.

I certainly appreciate this script, Neb. It has HUGE potential for many things.

Shad MOrdre


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Wed Jun 27, 2012 12:56 pm 
Furious Typer
User avatar

Joined: Mon Apr 25, 2011 6:48 pm
Posts: 186
Location: OSgrid, of course!
Nova,

Just checked out the picidae site. Intrigued to say the least. So I use Windows, and would like to compile the pici server, but it needs some Linux based header files and components. Any suggestions?

Shad MOrdre


Top
 Profile  
 
 Post subject: Re: Request a Website on a prim.
PostPosted: Wed Jun 27, 2012 2:07 pm 
Furious Typer

Joined: Fri May 11, 2012 9:37 pm
Posts: 51
Location: Canada
Hi Shad,

Unfortunately, my days of compiling in Windows dates back to the last century. However there is a poor excuse for a forum on the picidae.net site where you may get some helpful feedback.

- Nova


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 7 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net