![]() |
Code for daily picture?
I want to include a self rotating daily picture in my html page code (index.shtml). I will name the pictures according to the dates and upload them on my server, say 051202.gif for 5th December 2002 etc.
What code do I insert in my html to automatically fetch that day's picture? Some kind of javascript. I cant use php I supposed since the index page extension is not php but shtml? |
email me [email protected], and i'll help you out :)
|
You can create a seperate PHP page and include it on your SHTML page like this:
[!--#include file="random_img.php"--] The PHP file would look like this: [?php $date = date("dmY"); echo("[img src='/dailypics/$date.jpg']"); ?] Remember to replace [ and ] with < and >. Hope that helps. :) |
The easiest way is to have a "default" picture (default.jpg) and use a crontab to copy a picture to that filename every night at midnight.
|
| All times are GMT -7. The time now is 08:18 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123