Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Query in-world object from the web?

Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
09-24-2006 20:30
If I have an object on my land inworld that's rezzed and running, is it possible to send queries to that object from my website, say via crontab, have it perform an action, and then return the results via xmp-rpc or llhttprequest to the remote server?

I'm well versed in how to use llhttprequest, but havent ever used xml-rpc.

If its a matter of UID of the prim running the script, then that should be easily solved by having a script on the prim update the remote server with its current UID a couple times a minute. The server can then use that data to initiate the xml-rpc request.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
09-25-2006 04:16
It doesn't work quite that way.

You open a remote data channel, that generates a key that you can capture (the scripts for this are in the xml-rpc section on the wiki.

Send that out... use it inbound - there's a lovely php inclusion called xmlrpc.inc or similar that can very quickly give you something that formats to the lsl expectations.

You can reply to some extent with the reply function that's built in.

If it's a cron job though, why do it that way? Put in a timer and llHTTPRequest the data out...
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
09-25-2006 06:40
So say, in-world object(OBJ) generates the key for the remote data channel.

OBJ sends that key to the php server, basically telling the php server 'this is where to contact me.' Now, once the php server sends a reply, is that key for the channel destroyed when information is sent to the OBJ? Or, will that key be open for a while even after receipt data has been received?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
09-25-2006 07:02
Does the data have to be run periodically and not on change?
if nothings changed why bother updating?
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
09-25-2006 07:15
The key stays open. The only things that seem to kill that are long periods (>24h) of inactivity and full updates.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
09-25-2006 07:23
thanks Eloise. I think that'll solve meh problem.
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
09-25-2006 12:43
From: Eloise Pasteur
The key stays open. The only things that seem to kill that are long periods (>24h) of inactivity and full updates.


Also - note that if your object moves, sim crossings tend to kill the channel as well. (There are workarounds for this issue by utilizing the Changed() event).
_____________________
------------------
The Shelter

The Shelter is a non-profit recreation center for new residents, and supporters of new residents. Our goal is to provide a positive & supportive social environment for those looking for one in our overwhelming world.