July 20th, 2000, 04:54 PM
Hi, I'm developing a weather web page and want to include sunrise/sunset info.
I've entered the cities into a table (php/mysql), they have fields like cityname, max, min, weather. I want to add latitude and longitude to the table. Then when the page loads up it reads the cities lat/long and gives you the sunrise/sunset times for that day.
Is this an easy thing to do?
July 20th, 2000, 05:07 PM
do you have the algorithm that gets the sunrise and sunset times from the latitude and longitude? if so, it'd be very easy, i'd guess. just store the lat and long as integers or floating point numbers, pull them out and have php determine your sunrise and sunset times...
what is the algorithm?