Thursday, August 30, 2012

date_sun_info

8/30/2012

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 :
<?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) );

?>

helpful? Share this

The Editorial Team of 4everTutorials consists of a group of PHP Professionals.

0 comments:

 

© 2014 4everTutorials. All rights resevered.

Back To Top