Putting It to Use
This next script shows how to open a file from the Internet and display it on your page, as in Figure 6-1. The National Oceanic & Atmospheric Administration (NOAA) provides hourly weather information for almost every airport in the United States. They provide this information on their site at www.noaa.gov in many formats. One weather report format they provide is called METAR. METAR is a French acronym that roughly translates as “Aviation Routine Weather Report.” METAR provides useful information like current winds, barometric pressure, cloud cover, etc. This script accesses the files stored on the NOAA's datastore for this information, relative to the airport identifier you provide to the script. If you enter “KJFK” for New ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access