I came up with this idea as a background for a banner for my new blog site I’m working on. The concept is pretty simple: show the sun rising/setting at the appropriate times, show the moon in its current phase at night, and add a weather layer to show the weather in my current location. Check the current development http://dev.matthewroy.com/weather/
So I got to work and pulled in my google latitude position, as a JSON array, with the google latitude API. Then I wrote a php script to get the sunrise/set times for my location using date_sunrise. I then compare the current time to sunrise and determine where the sun should be placed and what time of day/night it is.
Additionally I bring in the current moon phase and draw random stars on the background at night. I also put a little gradient glow at the bottom for dusk and one for sunrise/set.
After i have all this data and images i build a png with the gd library and layer all the stuff together. The eventual plan is to take this layer as a background in flash and add a weather layer over it using yahoo’s weather api. And put my twitter status, google reverse geocoded location, and yahoo instant messenger status indicator, over top of it all. I also want to add a “cloud” that displays images for my most used tags, kind of like an image based tag-cloud.
So enough yapping already…. Here are some images I captured for different times:








Leave a Reply