Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Save page from cgi script

Posted on 2011-09-08
6
Medium Priority
?
424 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 800 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 1200 total points
ID: 36509757
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

670 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