简体   繁体   English

从PHP中的经度和纬度获取阳光数据

[英]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 我有该位置的经度和纬度,但现在我必须确定该位置上每天的太阳时数。例如,假设我有一个位置“ NewYork”。现在我需要知道一天中的太阳时数在一个月内。所以我必须确定1月-8小时的追踪数据,fabruary-6小时

means in newyork in january there is 8 hours of sun and so on. 意思是在一月的纽约有8个小时的太阳等等。 Is some one know from where i can get that data . 有人知道我从哪里可以得到这些数据。 i am using php 我正在使用php

Who'd've thunk, PHP has a function for that! 谁想过,PHP就有一个功能!
http://php.net/manual/en/function.date-sun-info.php http://php.net/manual/zh/function.date-sun-info.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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