"; $more=""; $gmore=""; $bodyopts=""; for ($i=0; $i" . $bodies[$i] . ""; } $xss=""; //$ss="//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places%20Under%20Celestial%20Places&aregexographicals=y&aregeographicals=HTTP.Home%2Chttp.Sun%2Chttp.Moon&peninfo=75.57|-92.28|128301.127968_Home,64.04|-18.15|9728.65039_Sun,-16.30|151.44|127765_Moon&width=417&height=260&country=Places&popularity=&data=%20[75.57|-92.28|~Home~,2]%20,%20[64.04|-18.15|~Sun~,2]%20,%20[-16.30|151.44|~Moon~,2]"; $ss="//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places%20Under%20Celestial%20Places&aregexographicals=y&aregeographicals=HTTP.Home%2Chttp.Observer%2Chttp.Sun%2Chttp.Moon&peninfo=75.57|-92.28|127968_Home%20Observer,75.57|-92.28|128301_Observer%20Home,64.04|-18.15|9728.65039_Sun,-16.30|151.44|127765_Moon&width=417&height=260&country=Places&popularity=&data=%20[75.57|-92.28|~Home%20Observer~,2]%20,%20[75.57|-92.28|~Observer%20Home~,2]%20,%20[64.04|-18.15|~Sun~,2]%20,%20[-16.30|151.44|~Moon~,2]"; if (isset($_GET['ss'])) { if (urldecode($_GET['ss']) != "") { $ss=str_replace("+"," ",urldecode($_GET['ss'])); $xss="&ss=" . urlencode($ss); } } $cbemoji="127760"; $datasuffix="%20,%20[-16.30|151.44|~Moon~,2]"; $prewidthsuffix=",-16.30|151.44|127765_Moon"; $prepeninfosuffix="%2Chttp.Moon"; $homelat="75.57"; $homelong="-92.28"; $sunlat="64.04"; $sunlong="-18.15"; $moonlat="-16.30"; $moonlong="151.44"; $sb=""; if (isset($_GET['body'])) { if (urldecode($_GET['body']) != "") { if (strpos(urldecode($_GET['body']), "(") !== false) { $starbit="()"; $vstar=" value='" . explode('"', explode('"', str_replace("star(","",str_replace(")","",str_replace("+"," ",str_replace('%22','"',urldecode($_GET['body']))))))[1])[0] . "'"; } if (isset($_GET['observer'])) { if (urldecode($_GET['observer']) != "") { $sb="\n #epoch { display: none; } \n"; if (urldecode($_GET['body']) != "Moon" && urldecode($_GET['body']) != "Sun" && urldecode($_GET['body']) != "Earth") { exec("cat .." . '/' . "Python" . '/' . "sublunar.py | sed '" . '/' . "Moon" . '/' . "s" . '/' . "" . '/' . "" . urldecode($_GET['body']) . "" . '/' . "g' >> .." . '/' . "Python" . '/' . "thisone.py"); exec("" . '/' . "usr" . '/' . "local" . '/' . "bin" . '/' . "python3.3 .." . '/' . "Python" . '/' . "thisone.py > py_ephem.xxx"); if (strpos(explode(" ", file_get_contents("py_ephem.xxx"))[0], ":") !== false) { $vsotherlong="" . explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[0] . ":00:00"))[0] . str_replace("0.",".",("" . (explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[0] . ":00:00"))[1] / 60.0 + explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[0] . ":00:00"))[2] / 3600.0))); $vsotherlat="" . explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[1] . ":00:00"))[0] . str_replace("0.",".",("" . (explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[1] . ":00:00"))[1] / 60.0 + explode(":",(explode(" ", file_get_contents("py_ephem.xxx"))[1] . ":00:00"))[2] / 3600.0))); } else { $vsotherlong=explode(" ", file_get_contents("py_ephem.xxx"))[0]; $vsotherlat=explode(" ", file_get_contents("py_ephem.xxx"))[1]; } if ($vstar != "") { $ss.="%20,%20[" . $vsotherlat . "|" . $vsotherlong . "|~" . str_replace(" ","%20",explode('"', explode('"', str_replace("star(","",str_replace(")","",str_replace("+"," ",str_replace('%22','"',urldecode($_GET['body']))))))[1])[0]) . $fm_nm . "~,2]"; $sss=explode("&width=", $ss); $ss=$sss[0] . "," . $vsotherlat . "|" . $vsotherlong . "|" . $cbemoji . "_" . str_replace(" ","%20",explode('"', explode('"', str_replace("star(","",str_replace(")","",str_replace("+"," ",str_replace('%22','"',urldecode($_GET['body']))))))[1])[0]) . "&width=" . $sss[1]; $ss=str_replace("&peninfo=", "%2Chttp." . str_replace(" ","%20",explode('"', explode('"', str_replace("star(","",str_replace(")","",str_replace("+"," ",str_replace('%22','"',urldecode($_GET['body']))))))[1])[0]) . "&peninfo=", $ss); } else { $ss.="%20,%20[" . $vsotherlat . "|" . $vsotherlong . "|~" . str_replace(" ","%20",str_replace("+","%20",urldecode($_GET['body']))) . $fm_nm . "~,2]"; $sss=explode("&width=", $ss); $ss=$sss[0] . "," . $vsotherlat . "|" . $vsotherlong . "|" . $cbemoji . "_" . str_replace(" ","%20",str_replace("+","%20",urldecode($_GET['body']))) . "&width=" . $sss[1]; $ss=str_replace("&peninfo=", "%2Chttp." . str_replace(" ","%20",str_replace("+","%20",urldecode($_GET['body']))) . "&peninfo=", $ss); } } if (!isset($_GET['ss'])) { $vshomelat="" . explode("%3A", explode("%27", explode("iam.lat%20%3D%20%27", $_SERVER['QUERY_STRING'])[1])[0])[0] . str_replace("0.",".",("" . (explode("%3A", explode("%27", explode("iam.lon%20%3D%20%27", $_SERVER['QUERY_STRING'])[1])[0])[1] / 60.0))); $vshomelong="" . explode("%3A", explode("%27", explode("iam.lon%20%3D%20%27", $_SERVER['QUERY_STRING'])[1])[0])[0] . str_replace("0.",".",("" . (explode("%3A", explode("%27", explode("iam.lon%20%3D%20%27", $_SERVER['QUERY_STRING'])[1])[0])[1] / 60.0))); exec("" . '/' . "usr" . '/' . "local" . '/' . "bin" . '/' . "python3.3 .." . '/' . "Python" . '/' . "subsolar.py > py_ephem.xxx"); $vssunlong=explode(" ", file_get_contents("py_ephem.xxx"))[0]; $vssunlat=explode(" ", file_get_contents("py_ephem.xxx"))[1]; exec("" . '/' . "usr" . '/' . "local" . '/' . "bin" . '/' . "python3.3 .." . '/' . "Python" . '/' . "sublunar.py > py_ephem.xxx"); $vsmoonlong=explode(" ", file_get_contents("py_ephem.xxx"))[0]; $vsmoonlat=explode(" ", file_get_contents("py_ephem.xxx"))[1]; if (sizeof(explode(" ", file_get_contents("py_ephem.xxx"))) >= 6) { $afteri="

Next Full , New Moon (GMT) " . explode(" ", file_get_contents("py_ephem.xxx"))[2] . " " . explode(" ", file_get_contents("py_ephem.xxx"))[3] . " , " . explode(" ", file_get_contents("py_ephem.xxx"))[4] . " " . explode(" ", file_get_contents("py_ephem.xxx"))[5] . "

"; //$ss=str_replace("~Moon~", "~Moon" . str_replace("+","%20",urlencode(" ... Next Full , New Moon (GMT) " . explode(" ", file_get_contents("py_ephem.xxx"))[2] . " " . explode(" ", file_get_contents("py_ephem.xxx"))[3] . " , " . explode(" ", file_get_contents("py_ephem.xxx"))[4] . " " . explode(" ", file_get_contents("py_ephem.xxx"))[5])) . "~", $ss); } $ss=str_replace($homelat, $vshomelat, str_replace($homelong, $vshomelong, $ss)); $ss=str_replace($sunlat, $vssunlat, str_replace($sunlong, $vssunlong, $ss)); $ss=str_replace($moonlat, $vsmoonlat, str_replace($moonlong, $vsmoonlong, $ss)); } $xss="&ss=" . urlencode($ss); $gmore=str_replace("",$afteri,"
"); } else { $ss=""; } } else { $ss=""; } } } $htmlis=" Astronomy Helper via Python PyEphem Module

Astronomy Helper via Python PyEphem module

RJM Programming - October, 2018

Celestial Body ... or ...
Astrometric geocentric
Right Ascension ... for now or ...
Declination ... for now or ...
"; if (isset($_GET['body'])) { if (urldecode($_GET['body']) != "") { if (file_exists('py_ephem.xxx')) { unlink('py_ephem.xxx'); } if (file_exists('../Python/thisone.py')) { unlink('../Python/thisone.py'); } if (isset($_GET['epoch']) || isset($_GET['observer'])) { if (urldecode($_GET['observer']) != "") { $more="
"; file_put_contents("../Python/thisone.py", "import ephem\n" . urldecode($_GET['observer']) . "\n"); $htmlis=str_replace("", urldecode($_GET['observer']) . "", $htmlis); exec("cat .." . '/' . "Python" . '/' . "Jupiter.py | grep -v '==' | grep -v 'import ephem' | sed '" . '/' . ".dec" . '/' . "s" . '/' . "" . '/' . ".az" . '/' . "g' | sed '" . '/' . ".ra" . '/' . "s" . '/' . "" . '/' . ".alt" . '/' . "g' | sed '" . '/' . "Jupiter" . $starbit . '/' . "s" . '/' . "" . '/' . "" . urldecode($_GET['body']) . "" . '/' . "g' | sed \"" . '/' . "compute()" . '/' . "s" . '/' . "" . '/' . "compute(iam)" . '/' . "g\" | tr '!' '/' >> .." . '/' . "Python" . '/' . "thisone.py"); $htmlis=str_replace(">Right Ascension<", ">Altitude<", $htmlis); $htmlis=str_replace(">Declination<", ">Azimuth<", $htmlis); $htmlis=str_replace(">Astrometric geocentric<", ">Horizontal coordinate system<", $htmlis); $htmlis=str_replace(":none;", ":block;", $htmlis); $htmlis=str_replace("Please select a Celestial Body below ...", "Celestial Bodies ...", $htmlis); } else if (urldecode($_GET['epoch']) != "") { exec("cat .." . '/' . "Python" . '/' . "Jupiter.py | sed '" . '/' . "Jupiter" . $starbit . '/' . "s" . '/' . "" . '/' . "" . urldecode($_GET['body']) . "" . '/' . "g' | sed \"" . '/' . "compute()" . '/' . "s" . '/' . "" . '/' . "compute(" . str_replace('/','!',urldecode($_GET['epoch'])) . ")" . '/' . "g\" | tr '!' '/' >> .." . '/' . "Python" . '/' . "thisone.py"); $htmlis=str_replace(" value=''", " value=\"" . urldecode($_GET['epoch']) . "\"", $htmlis); } else { exec("cat .." . '/' . "Python" . '/' . "Jupiter.py | sed '" . '/' . "Jupiter" . $starbit . '/' . "s" . '/' . "" . '/' . "" . urldecode($_GET['body']) . "" . '/' . "g' >> .." . '/' . "Python" . '/' . "thisone.py"); } } else { exec("cat .." . '/' . "Python" . '/' . "Jupiter.py | sed '" . '/' . "Jupiter" . $starbit . '/' . "s" . '/' . "" . '/' . "" . urldecode($_GET['body']) . "" . '/' . "g' >> .." . '/' . "Python" . '/' . "thisone.py"); } exec("" . '/' . "usr" . '/' . "local" . '/' . "bin" . '/' . "python3.3 .." . '/' . "Python" . '/' . "thisone.py > py_ephem.xxx"); $ar_dec=""; if (file_exists('py_ephem.xxx')) { $ar_dec=file_get_contents('py_ephem.xxx'); unlink('py_ephem.xxx'); $htmlis=str_replace(">" . urldecode($_GET['body']) . "<", " selected>" . urldecode($_GET['body']) . "<", $htmlis); $htmlis=str_replace("", "   " . explode(" ",$ar_dec)[0] . "   " . $gmore . "", $htmlis); $htmlis=str_replace("", "   " . explode(" ",$ar_dec)[1] . "   " . $more . "", $htmlis); } } } echo $htmlis; ?>