Creating a PHP object that communicates with prims

AnnMarie at AnnMarie at
Thu Aug 19 12:09:03 PDT 2010

  I have been doing a simple form of that for some time.  Objects send 
live data to my data base.  When the data base receives updated 
information it creates a new web page with as many characters and 
graphics as needed.

The media URL on my sim is set to the web page. (Actually various 
scripts can change which web page is to be displayed).

Displays throughout my sim have a generic texture that says "ENABLE 
MEDIA TO READ THIS DISPLAY" which gets replaced with the current web 
page.  A timer recycles the URL to refresh for updates.

Although not currently implemented this can allow viewers to select web 
pages to be displayed by clicking on a menu.

Downsides are all must display the same page.  Viewers must enable Media.

AnnMarie Otoole

On 8/19/2010 2:03 PM, Fire wrote:
> Hi everyone,
> Fire Centaur here,
> I have started experimenting with the Yii (MVC) PHP framework inorder 
> to make my code more secure and robust...
> And after ready Kelly Lindens hacks on HTTP-In and Shared Media, it 
> hit me, that we could
> most likely create quite a nice database driven PHP class that could 
> represent a PRIM, and fully interface with the SL environment in PHP 
> by interacting with the PHP object.
> For example,
> If each Prim registered itself in our db with an HTTP-in URL, we could 
> build in an LSL command console that accepted commands from our PHP 
> object, and send info back to our PHP object as a response -
> ie:
> $hud = new Hud();
> $hud->connectPrimInterface("name_registered_in_prim_dns_registry");
> $avatarArray = $hud->getAvatarsInArea(100,PI);
> foreach ($avatarArray as $av){
>     $av->sendInstantMessage("Hello {$av->avname}!");
> }
> $hud->displaySurface("There are {count($avatarArray} avatars in the 
> area");
> You think this could work / be a good way of offloading the logic of 
> prims to PHP?
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the secondlifescripters mailing list