The Winter countdown …

As you can probably see, I added a countdown to Spring to the top of the journal.

I created it as a self-taught lesson about creating dynamic images through PHP and the GD library. When the page is accessed, the web server reads in the script that generates the image and then contacts the NOAA weather site to get the current temperature for the Cleveland lakefront area. The server then calculates the number of days between now and the first day of Spring and finally creates forty random snowflakes and scatters them across the image. Once all that is combined with the background picture, the resulting image is sent to your web browser.

If you refresh your browser window, you’ll see the snow change.

A nearly useless waste of computing power, but still fun none-the-less.

Leave a Reply

Your email address will not be published. Required fields are marked *