From: Chris Rhoden Date: 2009-07-20T08:45:42+09:00 Subject: Re: external html page include --00163646d92c646cc7046f179edb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Didn't look closely enough at what's going on here. What exactly are you trying to do? The previous response should work. However, if you are actually requesting a page from something like Google Docs, you need to realize that the request will be made at the server, not in the browser, so your cookies will not be in the request, so you will not be authenticated unless you explicitly do that. It is more trouble than it's worth in most cases. Additionally, unless you intend to alter the HTML in some way before including it in the page, it will look all off, so probably best to stick with iFrames unless it is absolutely necessary to scrape (which is what you are doing) -chris On Sun, Jul 19, 2009 at 7:38 PM, Chris Rhoden wrote: > You should use something like > require 'open-uri' > > puts open('http://some-url.com/file').read > > or the curl libraries. > > Chris Rhoden > Chief Developer - (ph)Pea > Co-Founder - Invalid Media > > > > On Sun, Jul 19, 2009 at 7:13 PM, Sam Ginko wrote: > >> That is what I thought and it aint working. I'm trying to open a file on >> another server i:e http://docs.google.com/View?id=10. So I guess iframe >> is the only option >> >> 7stud -- wrote: >> > Sam Ginko wrote: >> >> How? with a File.Open()?. I'm new to ruby so I'm not sure if that is >> >> what I should do. >> >> >> > >> > You could write: >> > >> > f = File.open("page.htm") >> > f.read() >> > >> > or you could combine that into one line: >> > >> > File.open("page.htm").read() >> > >> > or you could use the shortcut: >> > >> > IO.read("page.htm") >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > --00163646d92c646cc7046f179edb--