Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XML-RPC > Webpage > database without a browser?

Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
04-10-2006 18:23
Question.

When sending data from SL using RPC up to the dataserver, I know it can easily be called from a web page when the channel matches the object with the script. k.

First I started by displaying my online status on a web page. Very simple stuff.
Then I decided to send other info like a message to the dataserver. No problem once again. Simple stuff. So long as I am on that web page.

K. Took it a step further and had the message that I sent myself stored in a database. Great! And once again easy stuff..so long as I access that web page.

Now, how do I get it to "hit" the web page without it being loaded in my browser? Is this possible? Or do I have to have a web page constntly open refreshing every 5 seconds to receive messages from my in-world object to store in my database?

Anyy ideas or solutions for this?
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
04-10-2006 19:57
The basic concept you're after here is that you need to have an object in SL send an email to trigger something to happen on the server end. PHP is probably one of the easiest languages to do it in. But it's possible with many others. I've personally done it with Java, PHP and will soon be doing the same in Ruby. Of course if you don't want/need an object in SL to trigger the update, I'm sure you could do a very similar thing on a schedule with something like cron (although I've never had a need to attempt it that way myself).

Here's one page I found on the net with a quick search that describes how to configure various email servers to capture an email and forward it to a php page...
http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html
MC Seattle
Registered User
Join date: 3 Apr 2006
Posts: 63
04-12-2006 02:44
Another way is to write a system PHP script (starts with something like #!/usr/bin/php) that is called from your crontab periodically and initiates the connection to SL. Sending an e-mail from inworld imposes a 20 second delay, but responding to an XML-RPC connection costs nothing, so you're free to do this as often as your own server and the Linden Labs XML-RPC server can handle. I figure that faster you poll the more incentive there is for new LSL functions to make outbound connections, since this is a ridiculous method of communication.

If you decide to go the e-mail direction and need help let me know, I have a working setup using PHP on my server.