Solved

Save page from cgi script

Posted on 2011-09-08
6
416 Views
Last Modified: 2012-05-12
I am doing a javascript file which will save 2 html pages and send them with outlook client every end of the month. Task scheduler will run the bat file to execute the .js file.

Sending mail will not be a problem, however I am looking how to save a html page which is returned by the cgi script (ex: http://192.x.x.x/status/getCounter.cgi).

Script is mentioned to open explorer, navigate to that specific url, save html from cgi script and send it. Probably there is no need to open explorer for this so if you have any other suggestion please share.

Thank you.
0
Comment
Question by:mertez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 200 total points
ID: 36502960
If I understand you correctly, here's a minimal script without error handling which will retrieve and save a web page.
#!/usr/bin/perl

use strict;
use warnings;
use LWP::Simple;

my $url = 'http:://somewhere.com/webpage.html';
getstore($url, '/destination/path/to/webpage.html');

Open in new window

0
 

Author Comment

by:mertez
ID: 36503046
Thanks for your contribution but I was thinking to run it on win environment where perl is not installed by default. I was thinking about using javascript.. If you know any other  way to do it please share..

0
 
LVL 28

Expert Comment

by:FishMonger
ID: 36503224
Is there a particular reason why you don't want to install Perl?

If you want to use a javascript only solution, then I'll leave that to someone else that has more javascript knowledge than I.

0
 

Author Comment

by:mertez
ID: 36503551
Script will run on a client computer and I am not so comfortable to install additional software just for running the script. However I will check how to do it in perl too..

thank you!
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 300 total points
ID: 36509757
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can I do this in Angular, instead of jQuery? 2 22
Error Handler 8 43
Dropdown animation to normal dropdown 6 28
Angular - why isn't this table working? 20 25
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question