Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture a Webpage

Status
Not open for further replies.

lakeside12

Programmer
Apr 20, 2009
43
CA
Hello,

I am not sure which forum this really needs to go in, but I will start here.

In Unix and the old days of DOS you could redirect a page from displaying on a monitor to a file with the double chevron such as MyPage.txt >> saveit.txt

I know you can do this with webpages where what you see in the browser is captured as HTML into a file so it can be stored or viewed later

How is that achieved or can you point me in the right direction

Many Thanks
 
The simplest way is to use the Browsers Save As feature. Most have it under the File Menu.

You could of course do a Print Screen to capture what the
browser is displaying.


If these solutions are not what you are looking for perhaps you can explain in greater detail what you want. Is it something you are going to be doing, or is it something you want your users to do?

Perhaps employing a server side language to convert it to a PDF on the file may be what you are looking for.


None of these of course have anything to do with Javascript, so perhaps explaining a bit more what you want can help us point you to a better suited forum.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Hi
Thank you for your message which I appreciate

The webpage "Save function" is exactly what I am looking for, particularly because it saves the webpage as a HTML

The only thing is that I want to be able to specify a url and save the resulting webpage. This of course needs to be automatic without human intervention, it will all be within the web domain I am working on too

many thanks
 
on a unix/linux box you have the wget command which does exactly what you want.

I do not know if there is anything similar for windoze (I am sure there must be), although as it is a command line program i would imagine it would not be difficult to recompile it from source.

I do not Have A.D.D. im just easily, Hey look a Squirrel!
 
Hi

Thanks for your reply, I was looking around and I found that by putting a SaveAs button on a form

document.execCommand("SaveAs")

I can achieve the same effect as if I saved the webpage using the browser Save As

So the question is this

Can I put this SaveAs Function somehow at the bottom of the webpage so when the page completes, it can perform it's Own Self-Save.

I am not familiar with the Save command, I am hoping I can specify a filename in there so no Human Interaction is needed.

Anyway that is my current thinking, I understand this works only in I.E and that is fine as it will be on my server.

Any help is much appreciated


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top