} else { echo '<div class="text-danger text-center" style="font-size:16px;"><br>No Irish ATC online right now</div><br>'; } unset($atcs); ?> </table> </div> <div class="tab-pane fade" id="metar"> <p> <?php cacheFile("datafiles/metar.txt", "http://metar.vatsim.net/metar.php?id=EI"); echo '<div class="text-justified"><samp> <p>' . getMetar("EICK") . '</p> <p>' . getMetar("EIDW") . '</p> <p>' . getMetar("EIKN") . '</p> <p>' . getMetar("EINN") . '</p> </samp></div>'; ?> </p> </div> <div class="tab-pane fade" id="inbound"> <table class="table table-striped table-condensed" style="margin:0;"> <?php cacheFile("datafiles/in.json", "http://api.vateud.net/online/arrivals/ei.json"); $pilots = json_decode(file_get_contents("datafiles/in.json")); if ($pilots) { echo '<tr> <td>Callsign</td> <td>Name</td> <td>From</td> <td>To</td>
(at your option) any later version. VisuGps is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with VisuGps; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Copyright (c) 2008 Victor Berchet, <http://www.victorb.fr> */ header('Content-type: text/plain; charset=ISO-8859-1'); header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); $lat = isset($_GET['lat']) ? floatval($_GET['lat']) : 44.0; $lon = isset($_GET['lon']) ? floatval($_GET['lon']) : 6.0; echo getMetar($lat, $lon); if (($dept = getFrenchAreaCode($lat, $lon)) > 0) { if (count($stationIds = getFrenchWeatherStations($dept))) { foreach ($stationIds as $id) { echo getFrenchWeatherStationWeather($id); } } echo "\n"; echo getFrenchWeather($dept); } function getMetar($lat, $lon) { $windName = array("N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSO", "SO", "OSO", "O", "ONO", "NO", "NNO", "N"); $url = "http://ws.geonames.org/findNearByWeatherJSON?lat={$lat}&lng={$lon}"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);