Meteosat block

8.2.2. Meteosat block

Figure 8-2. Meteosat block.

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[1]):

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.

Notes

[1]

Actually, the source code for the PHP-Nuke block is slightly different, but the algorithm is exactly the same.

 

Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 337,498,498
  • Today: 35,038
Server InfoServer Info
  • Sep 26, 2017
  • 11:17 am PDT
 
 

Daily Inspiration