Re: Displaying the html from a ruby .cgi script



Marc Heiler wrote:
I have a script, foobar.cgi

I can load it into my browser, as in
http://localhost/foobar.cgi

[...]
Is there an easy way to grab that generated html code and
display it (as a long string) on a console?
[...]
a "ruby only" solution, which I would prefer

require 'open-uri'
print open('http://localhost/foobar.cgi').read


I thought lynx -dump might help but it doesn't,

What does "it doesn't" mean? If it means "but I don't see the HTML",
then that because you should've used -source, not -dump.
--
Posted via http://www.ruby-forum.com/.

.



Relevant Pages

  • Re: Page fetched with fopen is incomplete - Apache, PHP 4.3.5, Windows 2000
    ... I have a very simple script to grab a web page and simply ... > display it on my browser. ... However on pretty much all websites I have ...
    (php.general)
  • Re: intranet page not viewable
    ... The page is basic HTML code. ... > Security setting to low but the page still does not display. ... When I point my browser to the local HTML file the page will ...
    (microsoft.public.windows.inetexplorer.ie6.ieak)
  • Re: Newline and tab characters
    ... Something is converting them BEFORE sending the html code to the client browser. ... strip these characters before display, checking first that they don't occur ... within a tag in which case I mustn't strip them. ...
    (php.general)
  • IE 6 only displays part of an intranet web page
    ... The page is basic HTML code. ... Security setting to low but the page still does not display. ... When I point my browser to the local HTML file the page will ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • intranet page not viewable
    ... The page is basic HTML code. ... Security setting to low but the page still does not display. ... When I point my browser to the local HTML file the page will ...
    (microsoft.public.windows.inetexplorer.ie6.ieak)