date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end
array date_sun_info ( int $time , float $latitude , float $longitude )
Example :
array date_sun_info ( int $time , float $latitude , float $longitude )
Example :
<?php /* Online PHP Examples with Source Code website: http://4evertutorials.blogspot.in/ */ $northernmost_city_latitude = 78.92; // Ny-Ålesund, Svalbard $northernmost_city_longitude = 11.93; $southernmost_city_latitude = -77.88; // McMurdo Research Station, Antarctica $southernmost_city_longitude = 166.73; print_r( date_sun_info( strtotime("2008-01-01") , $northernmost_city_latitude, $northernmost_city_longitude) ); print_r( date_sun_info( strtotime("2008-04-01") , $northernmost_city_latitude, $northernmost_city_longitude) ); print_r( date_sun_info( strtotime("2008-01-01") , $southernmost_city_latitude, $southernmost_city_longitude) ); print_r( date_sun_info( strtotime("2008-06-01") , $southernmost_city_latitude, $southernmost_city_longitude) ); ?>
0 comments:
Post a Comment