Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

php instead of email?

Danielz Shackle
Registered User
Join date: 30 Apr 2006
Posts: 100
07-16-2006 17:25
hey there, im sure theres been talk on this, but ive been out of forums for awhile and the search isnt that great. Instead of using email between objects, which is bad if server has to be reset cuz keys are reset, i was thinking of using some of my server space and using php or something else to send messages bewtween objects. Im done alot of html, some java, and fairly good with lsl scripting, but havent messed with php yet.

can objects talk directly with web page and eachother this way, or maybe use it for them to auto send their keys everyso ofeten so if was sim restart the other objects have new keys? any advice on what scripts to learn would be appreacaited, and if someone has time to make or point me to exapmles id really be happy, thanks
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
07-16-2006 17:41
Yes, objects can make requests to web pages using llHTTPRequest.
_____________________
Ruby loves me like Japanese Jesus.
Did Jesus ever go back and clean up those footprints he left? Beach Authority had to spend precious manpower.
Japanese Jesus, where are you?
Pragmatic!
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
07-16-2006 17:46
Well, first of all, rezzed object UUIDs do not change on server crash/reset/restart. There is a highly improbable potential for them to get lost, generally when it crashes shorly after rezzing, but their keys should never change.

Now, as to using external servers for object->object communication, llHTTPRequest by itself won't do it. You would have to use Email or XML-RPC to contact the destination object. llHTTPRequest sends a request from an object to an external server, and returns the result of the request back to the same object. To pass information to another object, the web server would have to use XML-RPC to send the data back to the other object in SL.

Either with llEmail or llHTTPRequest/XML-RPC, you will still be using UUID keys to address the destination object, so any issues regarding keys will still be present.

The downside to using llHTTPRequest is the throttler, which kicks in after so many requests per Owner per sim.
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
07-16-2006 18:39
I'll add a more general question:

Other than XML-RPC to a remote webserver is email the only way to enable inter-object communication that doesn't rely on the various chat commands (llSay, llShout etc)?

I can't see any other way to do it, but constantly polling the email queue seems excessive to me.
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
07-16-2006 18:49
From: Talarus Luan


The downside to using llHTTPRequest is the throttler, which kicks in after so many requests per Owner per sim.


Is llHTTPRequest throttled? If not it would be possible to write a daemon that listens on port for HTTP requests. The request URL would be the message from the SL script instead of a URL, and the returned response would be the result instead of a webpage.
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
07-16-2006 21:48
yes it's throttled :D see . . . /139/2c/109571/1.html
_____________________
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
07-17-2006 18:44
every good platform has these kind of http restrictions, i mean just imagine where the internet would be if they didnt, some yahoos would make a totally live streaming 3d world with multimedia and entertainment :D

for the record the one time ive used http request for interobject comms i used http as outgoing and php mail to spam my objects with the return