- Nov 13, 2001
- 174
- 0
- 0
Any ideas? I think it can be done with a script (either perl or PHP but I have no PHP experience) but i just need to clarify. Or if there is an easier way please say.
Originally posted by: DarrylLicke
Any ideas? I think it can be done with a script (either perl or PHP but I have no PHP experience) but i just need to clarify. Or if there is an easier way please say.
Originally posted by: ergeorge
Here's one way.
Say I want to rotate the images once/hour. They are named:
image0.jpg
image1.jpg
image2.jpg
.
.
.
image23.jpg
Take your html file, myfile.html, and rename it myfile.temp. Edit the .temp file to replace the image name with the string ROT_IMAGE.
Now put the following command in your chrontab to run every hour:
sed 's/ROT_IMAGE/image'$(date +%H)'.jpg/' myfile.temp > /path-to-html-dir/myfile.html
This will replace the string ROT_IMAGE with a file name formed with the hour of the day, and write the result in your html directory.
Originally posted by: DarrylLicke
Was that in perl? if so you lost me which means you will defintely lose the client who has to upkeep the site after I'm gone. Coould you explain it again?
