Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XML-RPC - who can help with this?

Led Writer
Registered User
Join date: 12 Apr 2007
Posts: 14
03-23-2008 17:52
hi there,

I'm trying to send data to an object in SL. I tried the email function, but it doesnt seem to work well as delay can be very long (up to several hours). Sending emails to an object seems to work great within SL using llEmail(); though.

Anyway, I ended up finding out about XML-RPC and as I'm quite familiar with LSL and PHP, I didn't have too many problems in understanding what I was actually doing with my PHP and LSL scripts. - Bad thing... it didn't work :-)

After some time browsing the internet for interesting information on this topic, I found the following website:

http://secondlifehowto.com/blog2/2006/12/30/howto-make-xmlrpc-calls-to-an-in-world-object/

I followed this tutorial step by step and I tried all different solutions, which can be found on the lsl wiki, but somehow this does not work.

Important to mention is the fact, that this tutorial, I mentioned before, features a web interface (source code is provided) that sends information to your object running the XML-RPC script and THIS WORKS!!! I simply type the object key and message into form fields and click submit. One second later the object receives the request.

BUT

If i exactly follow this tutorial and create php scripts myself (copy & paste them) or any tutorial I found (wiki, etc...) it does NOT WORK!

It seems my server, running the php script, does not send the request at all.

I have to say that it is not my own server, but rented webspace that features php, xml, etc...

Could there be something I'm doing wrong or is it my server causing problems?

Thanks in advance.

here is another tutorial I tried:

http://www.othala.co.uk/2008/02/05/httpxml-rpc-interface-example-for-second-life/
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
03-23-2008 18:06
To save you some time and bother here: don't use XML-RPC. Forget about it entirely. There are known issues with it that aren't going to be fixed and it may well disappear completely; this has been stated quite clearly by Lindens. Use llHTTPRequest, or some other method.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
03-23-2008 18:06
Using HTTP requests to poll your server for data every 15 seconds is better then an email once an hour or XML-RPC. Also, some free hosts block XML-RPC.

Edit: Oridanal o.o That was quick, 10s before me
_____________________
~Solar Alter~
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
03-23-2008 18:50
like said, avoid it :)

for my delivery server i simply do this:
main script: poll website for delivery cache ever 60 seconds
slave script: if timer runs out, it resets the main script and sends the fetch command

main script sends a messgae to the slave script befor executing an http call so incase the timer stalls or dies the backup script will kick start the main script after 60 seconds as it wasn`t reset, main script done fetching for items, it resets the backup script wich will start counting down at 120 seconds

maybe overkill but have had issue`s with timers just dying in the past and you never want a delivery server die no matter what :)
_____________________