note 100332 added to function.date-sun-info
| From: | ELYM dot at osu1 dot php dot net | Date: | Fri, 08 Oct 2010 16:42:03 +0000 |
| Subject: | note 100332 added to function.date-sun-info | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173082@lists.php.net to get a copy of this message | ||
I have been working on my own php script to get current down or up for sun and moon. I had to add
function for any places that have 24 hour sun.
here is my code for places with 24 hour sun.
if ($sunrise == 0 && $sunset == 0) {
$sunrise24 = "";
$sunset24 = "";
//run suninfo
$sunup = date_sun_info(strtotime($year."-".$month."-".$day), $lat, $lon);
}
//check if sun is up all day.
if ($sunup[sunrise] == 1 && $sunup[sunrise] == 1) {
imagecopy($sky, $sun, 60, 20, 0, 0, $sun_width, $sun_height);
imagefill($sky, 0, 0, $bluesky);
}
----
Server IP: 69.147.83.197
Probable Submitter: 96.42.65.222
----
Manual Page -- http://www.php.net/manual/en/function.date-sun-info.php
Edit -- https://master.php.net/note/edit/100332
Del: integrated -- https://master.php.net/note/delete/100332/integrated
Del: useless -- https://master.php.net/note/delete/100332/useless
Del: bad code -- https://master.php.net/note/delete/100332/bad+code
Del: spam -- https://master.php.net/note/delete/100332/spam
Del: non-english -- https://master.php.net/note/delete/100332/non-english
Del: in docs -- https://master.php.net/note/delete/100332/in+docs
Del: other reasons-- https://master.php.net/note/delete/100332
Reject -- https://master.php.net/note/reject/100332
Search -- https://master.php.net/manage/user-notes.php