PDA

View Full Version : How to make a page with daily updated image?



100%
01-29-2005, 09:11 AM
I would like to make a webpage - which hotlinks the images
from other sites. These images change every day.....

I basically want to do the same as what this guy has done http://miette.develooper.com/~ask/comics/ but with my own choice.

for example
http://images.ucomics.com/comics/nq/2005/nq050129.gif

but tommorrow it will be: nq050130.gif
etc etc

the image for example is taken from this page - http://www.ucomics.com/nonsequitur/

is there any trick so it will automatically find the latest image eg "*.gif"?
:blink:

thanx


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD>
<P><BR><FONT FACE="Arial, sans-serif">Nonsequitur -
</FONT><A HREF="http://www.ucomics.com/nonsequitur/" TARGET="_blank"><FONT FACE="Arial, sans-serif">http://www.ucomics.com/nonsequitur/</FONT></A><BR>
<img src="http://images.ucomics.com/comics/nq/2005/nq050129.gif">
</center>
</body>
</html>

vivitron 15
01-29-2005, 09:31 AM
a php script will do this nicely:


<?php
$year=date("Y"); $month=date("m"); $day=date("j"); $time=date("H");

print("<img src=\"http://images.ucomics.com/comics/nq/2005/" .$year . $month . $day . ".gif alt=\"weathermap\" />");

?>


thats off the top of my head, but should work :)

100%
01-29-2005, 09:37 AM
thanx
do i save that as a php or html? is that finished or do in need to put that under html header etc
im dont know much about php.

vivitron 15
01-29-2005, 01:07 PM
put all the headers etc on that you would for html, and put my code in the <body> then save as php, should work :)