Index PHPmyEasyWeather PHPmyEasyWeather Homepage

Home
Demo
FAQ
Download
> Documentation
Contact
      

getTafFromWWW

getTafFromWWW -- return TAF information from WWW

Description

Array getTafFromWWW (string $ICAO);

getTafFromWWW returns TAF information for the given station ($ICAO). It works absolutely equivalent to getMetarFromWWW. There are some airports which provide METAR information to be sure but no TAF information, this might occur at smaller airports. In that case you have to look for the next bigger airport in the zone concerned.

getTafFromWWW returns an array with 3 elements and the following indexes:

  • "taf" containing a string with the entire TAF code
    e.g.: "GCRR 290500Z 291212 02022KT 9999 FEW025 PROB40 TEMPO 1221 02020G30KT"
  • "date" containing the date of issue e.g. "2005-12-05"
  • "time" containing the time of issue given in GMT“s timezone e.g. "15:30"

Use:

<?
include ("phpmyeasyweather.inc.php");
if ($input = getTafFromWWW ("GCRR")) { $TAF = $input["taf"]; $DATE = $input["date"]; $TIME = $input["time"]; } else { echo "no TAF information found!"; }
?>
      

Previous Up Next