Discussion Locked

caching script results as html

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Greetings,

I have a couple of scripts for news and calendar that change every couple of days. Most are written in perl, but some are in php.

Is there a way to automate the process of running these scripts and capturing their output (which isplain html) so that it can be included by server side includes?

Every couple of days, I run the scripts, view source, and save as "componentX.html" manually, and I figure there has to be a better way.

I can use cron to run the script, but how about redirecting its output to an html file? I'm on a Linux server.

Thanks,

Matt

1 reply

by jay eckles

the command in the crontab entry will be something like
perl /path/to/script > /html/path/componentX.html

Obviously replace /path/to with the path to the perl script, and replace /html/path with the path to the web server folder where you want to save the HTML file.

I don't know that PHP files can be run independently like Perl scripts can, so I can't give you a solution for that.

Good luck.

Jay
www.jayeckles.com

This discussion is closed to new replies.