Figure 8-2. Meteosat block.
The Meteosat block will display the most recent Meteosat images of the World and Europe. It is a good example of
a block that contains dynamic images whose filenames vary according to some date schema (see source
code of the Meteosat PHP-Nuke block):
The images are taken from
and are named YYYYMMDDHHMM.jpg, in GMT, so the script has to compute the year, month, day, hour and minutes in GMT, then round down the minutes to either 00 or 30. Thus, although the date and time
variables ($year, $month, $day) are dynamic, the schema itself is fixed: the filename is always of the form $year$month$day$hour$minutes.jpg.
Due to delays, the script doesn't try to get the exact latest image, it rather subtracts a safety intervall of 3600 sec from the current time, before it starts the calculations. This way it makes
sure an image will always be there.