{"id":35561,"date":"2018-01-17T03:01:36","date_gmt":"2018-01-16T17:01:36","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=35561"},"modified":"2018-01-21T13:51:45","modified_gmt":"2018-01-21T03:51:45","slug":"php-sun-information-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-sun-information-primer-tutorial\/","title":{"rendered":"PHP Sun Information Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sun_information.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP Sun Information Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sun_information.jpg\" title=\"PHP Sun Information Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP Sun Information Primer Tutorial<\/p><\/div>\n<p>PHP has some great code features built into versions as early as PHP 4, even earlier perhaps, though today&#8217;s work needs PHP 5.  Today, we&#8217;ve built a pretty simple web application around PHP&#8217;s <a target=_blank title='PHP Sun Information' href='http:\/\/php.net\/manual\/en\/function.date-sun-info.php'>date\/time sun information<\/a> function &#8230;<\/p>\n<blockquote cite='http:\/\/php.net\/manual\/en\/function.date-sun-info.php'><p>\ndate_sun_info<br \/>\n<br \/>\n(PHP 5 >= 5.1.2, PHP 7)<br \/>\n<br \/>\ndate_sun_info \u2014 Returns an array with information about sunset\/sunrise and twilight begin\/end\n<\/p><\/blockquote>\n<p>It&#8217;s here at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sun_information.php\" title=\"Click picture\">live run<\/a> link that uses the PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sun_information.php_GETME\" title=\"sun_information.php\">sun_information.php<\/a> source code you can download, and try yourself, if you like.  Within this code we allow, if access permits the user&#8217;s current location be reflected in default latitude and longitude HTML form values via Javascript <a target=_blank title='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Geolocation\/getCurrentPosition' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Geolocation\/getCurrentPosition'>navigator.geolocation.getCurrentPosition(success[, error[, options]])<\/a> call.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d35561' onclick='var dv=document.getElementById(\"d35561\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/php\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35561' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>PHP has some great code features built into versions as early as PHP 4, even earlier perhaps, though today&#8217;s work needs PHP 5. Today, we&#8217;ve built a pretty simple web application around PHP&#8217;s date\/time sun information function &#8230; date_sun_info (PHP &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-sun-information-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[301,302,481,483,652,684,719,932,997,2445,1279,1319],"class_list":["post-35561","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-date","tag-datetime","tag-geographicals","tag-geolocation","tag-javascript","tag-latitude","tag-longitude","tag-php","tag-programming","tag-sun","tag-time","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35561"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=35561"}],"version-history":[{"count":2,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35561\/revisions"}],"predecessor-version":[{"id":35610,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35561\/revisions\/35610"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=35561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=35561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=35561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}