Jump to content
Sign in to follow this  
Gayngel

Persistent URL for HTTP servers

Recommended Posts

I am creating a visitor log that posts names of avatars to an external server script by http however it  fails after a region restart because the url is released and the url has to be harcoded into the server.

 

How can I keep a persistent url to keep communicating with inworld objects?

 

I see a url can be requested again with CHANGED_REGION_START but doesn't that create a unique url for every request?

 

Share this post


Link to post
Share on other sites

I usually use some kind of simple database on my outworld servers to which the inworld objects repoort their URLs whenever a restart, script restart ... occurs

Share this post


Link to post
Share on other sites

To keep it all in-world, I used to use llEmail to update relays with the new ephemeral server URLs.

Then I switched to using the Experience Persistent Store for those URLs.

Then I realized I could use Experience KVPs for all relayed communications, faster and simpler than http (although polled instead of asynch). Of course, this requires that all the communicating scripts be on Experience-enabled land, so I still had http to get data from elsewhere to the relays (which are on land enabling my Experience).

Share this post


Link to post
Share on other sites

You can run your own web server at home using a Raspberry Pi computer with web server software, very easy to do, and will cost around $30.

then a very simple PHP script to store and update the SL URL, something like:

<?php
$myfile = fopen("seattest.txt", "w") or die("Unable to open file!");
$txt = $_POST['url'];
fwrite($myfile, $txt);
fclose($myfile);
?>

 

that writes the URL to a notecard, and can be read by any script that needs the in world SL URL

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...