On my website I want to display the sunrise and sunset time of a the place from where the person is opening the webpage. Now Google Web Search give the sunrise and sunset time if you search like this :http://www.google.com/search?q=sunrise:<city_name>
. How can I use this to provide this functionality on my website?
Asked
Active
Viewed 5,610 times
0

johngreen
- 2,676
- 5
- 32
- 47
1 Answers
5
I was looking for a similar service and found http://www.earthtools.org/webservices.htm#sun
Here's an example for New York for the 4th December:
http://www.earthtools.org/sun/40.71417/-74.00639/4/12/-5/0

koregan
- 10,054
- 4
- 23
- 36
-
Thank you!! That was a great answer and exactly what I wanted!! – johngreen Mar 11 '11 at 06:13
-
Their website provides information as to how to calculate these yourself if you were interested: `Sunrise/Sunset Times The sunrise and sunset times are calculated using a PHP script using formulae from www.srrb.noaa.gov [NOA06]. The times given do not currently automatically take account of daylight saving time (summer time). To take DST into account, make sure the "DST" box is checked.` – ryanjdillon Dec 23 '12 at 11:15