PDA

View Full Version : TAF's on a web-page


Courtman
2nd May 2003, 07:17
Hi

Does anyone know how I can get the latest TAF for my local airfield(s) on the homepage of a website I'm writing? I'd like the latest TAF and maybe METAR for LGW,LTN,BHX and LPL on a webpage but can't find any specific sites that offer this service...

drauk
2nd May 2003, 07:31
There are several ways I suppose. As one example, you can request them from another site and parse the response. No comments on the legalities of republishing such data though.

As an example, the NWS in the US allow you to enter airfield IDs and get the the metar for each. The MetOffice allow it too but there you have to register first, though the same mechanism would work. The URL for the NWS is:

http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=XXXX+YYYY

where XXXX and YYYY are airfield identifiers. You can add several.

To get this data on to your web page you could, most simply, include a frameset with the weather info in one frame. For a nicer looking page you could periodically grab the results of the URL above (use something like "wget", available for Windows and Unix/Linux) and then parse the results (use GREP or a simple Perl script) to leave just the bits you want. Stuff some HTML around the results and there you have it.

I can't see that it's worth the effort really - why not just have link directly, like this (http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=EGGW+EGLL)?

FJJP
3rd May 2003, 15:19
You can register with the UK Met Office as a general aviator. Then you get access to a raft of info, inc TAFs, METARs, forecasts, charts, etc.

http://www.meto.gov.uk/aviation/index.html