Index PHPmyEasyWeather PHPmyEasyWeather Homepage

Home
Demo
FAQ
Download
> Documentation
Contact
      

getStationInfo

getStationInfo -- return airport name, country and timezone of ICAO code

Description

Array getStationInfo (string $ICAO);

getStationInfo will return all important information of the airport whose ICAO code ($ICAO) is given to the function. If there is no airport found with the given ICAO code getStationInfo will return false. There are about 4,000 airports contained in the icao_db directory, so most of the inquired stations will be provided.

getStationInfo returns an array with 7 elements and the following indexes:

  • "station" contains the name of the Airport
  • "country" contains the country in which the airport is situated
  • "gmttime" contains the timezone referred to GMT e.g. "+1" or "-5"
  • "longitude" contains the geographical longitude e.g. 9°30'41"E
  • "latitude" contains the geographical latitude e.g. 47°40'15"N
  • "altitude" contains the altitude above sea level in feet
  • "altimeter" contains the altitude above sea level in meters

"longitude", "latitude", "altitude" and "altimeter" are new since version 1.03

Usage:

<?
if ($info = getStationInfo("EDDM")) { echo $info["station"] . ", " . $info["country"] . ", timezone GMT " . $info["gmttime"]; } else { echo "no airport information found"; }
?>

will display: "Munich Franz Joseph Strauss, Germany, timezone GMT +1"

      

Previous Up Next