These forums are CLOSED. Please visit the new forums HERE
Dynamic DNS service for HTTP-IN via Google App Engine |
|
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
07-20-2009 02:59
Specifications are syntax, but syntax should reflect semantics.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Bones Outlander
Registered User
Join date: 16 Jan 2008
Posts: 30
|
08-07-2009 00:52
This thread got me thinking about one of my scipts and being able to view data while offline. Now SL HTTP-IN returns only text so that's pretty horrible to view... so I started playing with a python script similar to the one in the first post with the plan to not do a redirect but to open the URL and read in a string of data that I could then parse and display nicely on a webpage.
The problem I have is no host I have found thus far will allow the opening of the port 12046 to allow my phthon script to access the SL HTTP-IN url the only way would be to run my own server, something I'd rather not do. Does anybody know of a host that would be willing to open the port to allow accessing the SL HTTP-IN url? Cheers |
Pavcules Superior
Registered User
Join date: 30 Oct 2006
Posts: 69
|
08-07-2009 02:41
I would like to point out that you can use SL HTTP-IN service without the need of owning a website. By using Javascript/AJAX you can create a webpage on your computer that can call the HTTP-IN URL and retrieve its data.
By using Kelly Linden's script, if you add a "llEmail" statement once the URL has been granted, you can get the URL sent to your email account. So at least that way you are aware of any updates. You could also create something in Silverlight to process the data if you want to develop something much faster / graphical. |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
08-07-2009 02:49
You could also create something in Silverlight to process the data if you want to develop something much faster / graphical. _____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Bones Outlander
Registered User
Join date: 16 Jan 2008
Posts: 30
|
08-07-2009 03:57
I would like to point out that you can use SL HTTP-IN service without the need of owning a website. By using Javascript/AJAX you can create a webpage on your computer that can call the HTTP-IN URL and retrieve its data. By using Kelly Linden's script, if you add a "llEmail" statement once the URL has been granted, you can get the URL sent to your email account. So at least that way you are aware of any updates. You could also create something in Silverlight to process the data if you want to develop something much faster / graphical. I could if it was only for me to access, but I need others to access the data too. I can use the redirect as per this topic (which I currently am) but would like to present the information with some HTML formatting, which HTTP-IN doesn't do ![]() |
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
08-07-2009 05:26
but an AIR app does the whole thing nicely, with nothing more than an html form, and is distributable as well as web publishable ;o)
|
Bones Outlander
Registered User
Join date: 16 Jan 2008
Posts: 30
|
08-07-2009 16:57
but an AIR app does the whole thing nicely, with nothing more than an html form, and is distributable as well as web publishable ;o) OK, so dumb question... what's an AIR app? |
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
08-08-2009 00:48
OK, so dumb question... what's an AIR app? Adobe AIR..use it to create RIAs in both web and desktop distributable form using web technologies such as html, perl, php, javascript, etc. cross-browser..check it out http://www.adobe.com/products/air/ |
Kinki Vacano
Registered User
Join date: 22 Dec 2006
Posts: 7
|
10-03-2009 11:27
Has anyone been able to use the POST method from an object in SL using llHTTPRequest()? I keep getting a 405 error and its not coming from my SL http server object. I wonder if its coming from the google apps engine server as I dont see any mention of a 405 in Darien's python code.
I am able to post data directly to the SL URL but not through the DNS service. GET works fine through the DNS so I know the app is working and setup correctly. Thanks, Kinki |
Eloh Eliot
freetard
Join date: 15 Oct 2005
Posts: 18
|
10-08-2009 19:11
Has anyone been able to use the POST method from an object in SL using llHTTPRequest()? I keep getting a 405 error and its not coming from my SL http server object. I wonder if its coming from the google apps engine server as I dont see any mention of a 405 in Darien's python code. I am able to post data directly to the SL URL but not through the DNS service. GET works fine through the DNS so I know the app is working and setup correctly. Hey Kinki, I think Darien's app is set up only to respond to GET requests (i.e., lines 12 and 85 of dns.py), where it's like: def get(self): You'll need to change these to: def post(self): or write your own post methods to get your app to respond to POST requests. |
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-14-2009 23:23
Just a note -
If you add in a '/' preceding the '?' on line 102 in dns.py ... you can successfully append variables to the DNS url! CODE
Thanks Darren! |
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-15-2009 00:41
I am a PHP coder new to Python. I am trying to do, roughly, the equivalent of file_get_contents in Python -- basically replacing class Redirector (in dns.py, as linked at the top of this thread) with an actual dump of whatever is retrieved.
Somehow, I can't seem to get the dump to work with a variable url. This is what I tried changing in class Redirector (line 100 ff) #recordedurl is a commented line, where I tried using self.response.out.write(recordedurl.read()) -- and that dumped google's homepage. but, when i try any variation of record.url in argument, I get a 500 CODE
Please help! |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
11-15-2009 04:45
Take out the "/". That's telling the server to fetch the index of a directory, not a file.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
|
11-15-2009 12:27
The redirect worked in passing var's with the '/?' - but note that I have the redirect commented out. I'm trying to just directly fetch and dump the http-in page data. using self.response.out.write(response.read()) with urlopen()
|
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-15-2009 12:28
The redirect worked in passing var's with the '/?' - but note that I have the redirect commented out. I'm trying to just directly fetch and dump the http-in page data. using self.response.out.write(response.read()) with urlopen()
|
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
11-15-2009 12:58
If the slash is necessary then there's a problem on the server.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Bones Outlander
Registered User
Join date: 16 Jan 2008
Posts: 30
|
11-15-2009 13:10
I am a PHP coder new to Python. I am trying to do, roughly, the equivalent of file_get_contents in Python -- basically replacing class Redirector (in dns.py, as linked at the top of this thread) with an actual dump of whatever is retrieved. Somehow, I can't seem to get the dump to work with a variable url. This is what I tried changing in class Redirector (line 100 ff) #recordedurl is a commented line, where I tried using self.response.out.write(recordedurl.read()) -- and that dumped google's homepage. but, when i try any variation of record.url in argument, I get a 500 CODE
Please help! You can't retrieve data directly via the google app engine as the ports used by SL/Http-in are blocked on MOST hosts. Bones |
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-15-2009 17:06
By default, the dns.py does a redirect - but, you could always just have google apps fetch the data on the page, and dump it, instead of redirecting. Anyway though, my problem is trying to figure out how to use Python's urlopen to read a variable URL. (It seems to only accept static defined URL's, even if on different ports.)
Google AppEngine is only on port 80, which is acceptable by most servers. |
Bones Outlander
Registered User
Join date: 16 Jan 2008
Posts: 30
|
11-15-2009 17:17
By default, the dns.py does a redirect - but, you could always just have google apps fetch the data on the page, and dump it, instead of redirecting. Anyway though, my problem is trying to figure out how to use Python's urlopen to read a variable URL. (It seems to only accept static defined URL's, even if on different ports.) Google AppEngine is only on port 80, which is acceptable by most servers. I had the google app retieving URL data fine and I'm sure I was just using; sock=urllib.urlopen((urllib.unquote(record.url))) # Open HTTP-IN URL data htmldata=sock.read() # Read data sock.close() print(htmldata) The problem is this WON'T work reteieving data from the in-world prim as the port used to connect to http-in is blocked by google. |
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-15-2009 23:11
I had the google app retieving URL data fine and I'm sure I was just using; sock=urllib.urlopen((urllib.unquote(record.url))) # Open HTTP-IN URL data htmldata=sock.read() # Read data sock.close() print(htmldata) The problem is this WON'T work reteieving data from the in-world prim as the port used to connect to http-in is blocked by google. For me, foo='http://google.com' self.response.out.write(urllib.urlopen(foo).read()) ^ that won't work but this works: self.response.out.write(urllib.urlopen('http://google.com').read()) ??? |
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
11-16-2009 00:50
This port problem is the major source of PITA here. What I don't understand is why LL went to the trouble of developing this whole http-in setup in the first place if they were gonna do it on a clown port.
|
Opensource Obscure
Hide UI
Join date: 5 Jun 2008
Posts: 115
|
11-16-2009 03:18
If the slash is necessary then there's a problem on the server. From LSL Wiki: when appending a query string to a cap URL there MUST be a trailing slash between the cap guid and the query string token '?' http://wiki.secondlife.com/wiki/LSL_http_server#Other_Limitations |
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
11-16-2009 03:53
maybe i just misunderstood what you meant but isn't that the expected behaviour for LSL HTTP Server? _____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Complex Infinity
Registered User
Join date: 24 Mar 2008
Posts: 19
|
11-16-2009 17:42
Does anyone know of a solution to use an intermediate free server (such as google appengine - or another, please list!) to process the data, to get by the port problem?
This port problem is the major source of PITA here. What I don't understand is why LL went to the trouble of developing this whole http-in setup in the first place if they were gonna do it on a clown port. |
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
11-17-2009 00:16
That's what I use my personal server for...my host, like all of them, won't communicate directly to that port, so I pass it thru my server, which will.
|