M
Max Benjamin
Hello,
I'm trying to use a ruby program to grab html outside of my domain and
alter it for use in another page in my domain. This is a proxy, right?
I thought I wouldn't have a problem with this but... I do.
<%
require "cgi"
require "open-uri"
cgi = CGI.new()
url = cgi.params['myURL']
htmlDoc = ""
test = open(url)
test.each() do |line|
htmlDoc += line
end
%>
<%= htmlDoc %>
When I ask for this program in a GET request I'm asked if I want to save
the file rather than getting a display of the html. I'm sure this is
just some stupid noob mistake I'm making. Any help would be
appreciated.
Best,
Max
I'm trying to use a ruby program to grab html outside of my domain and
alter it for use in another page in my domain. This is a proxy, right?
I thought I wouldn't have a problem with this but... I do.
<%
require "cgi"
require "open-uri"
cgi = CGI.new()
url = cgi.params['myURL']
htmlDoc = ""
test = open(url)
test.each() do |line|
htmlDoc += line
end
%>
<%= htmlDoc %>
When I ask for this program in a GET request I'm asked if I want to save
the file rather than getting a display of the html. I'm sure this is
just some stupid noob mistake I'm making. Any help would be
appreciated.
Best,
Max