Source Code:
(back to article)
<?php $timestamp = time(); $latitude = 37.7749; // San Francisco latitude $longitude = -122.4194; // San Francisco longitude $zenith = ini_get("date.sunrise_zenith"); $sunrise_time = date_sunrise($timestamp, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith); echo "Today's sunrise time for San Francisco is $sunrise_time."; ?>
Result:
Report an issue