简体   繁体   中英

Getting sunshine data from latitude and longitude in php

I am working on a site which requires sunshine (hours of sun in a day )data of a location. I have the laitude and longitude of the location but now i have to determine the hours of the sun per day on that location.For example say i have a location 'NewYork'.now i need to know number of hours of suns in a day in a month .So i have to determine the followimng data january-8 hours fabruary-6 hours

means in newyork in january there is 8 hours of sun and so on. Is some one know from where i can get that data . i am using php

Who'd've thunk, PHP has a function for that!
http://php.net/manual/en/function.date-sun-info.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM