MMDT1146 PHP Programming
Week 10


Week 10

Notes:

  • Much of the time, web site data is copywrited material.  Obtain permission before using data.
  • Make your data collection as universal and generic as you can.  Expect that there could be minor changes by the web site creator.
  • When extracting data from a website, consider all the possibilites of the data values.  There may be more digits, spaces, etc.
  • Use a text editor such as textpad to inspect the web site that you would like to retrieve data from.

Command line program notes.

Chron job program notes / demonstration.


Lab 10

This lab is to test your knowledge of being able to retrieve data from other web sites.

The lab must contain several items.  Your resulting output should like similar to this.

Create a subfolder on your web server named "weather".  (This may already be done for you from doing the in class exercise.)

Under the subfolder "weather" that you just created, you will need to create a file.  Name it something like "weather.php".

NOAA (National Oceanic and Atmospheric Administration) is probably the best place to get current weather information. Even better, NOAA is able to provide the weather information in XML format so it is extremely easy to parse.
https://graphical.weather.gov/xml/

Retrieve and display:

  • City, State.
  • Temperature.
  • Humidity.
  • Wind direction.
  • Wind speed.
  • Barometric pressure.
  • Time information was updated.

Assignment is due 1 week from when it was assigned.  50% penalty if late.

MMDT 1146 Lab 10
Grading Criteria
Date
Possible
Points
15
Your
Points
15
Retrieved and displayed city, state. 2 2
Retrieved and displayed temperature. 2 2
Retrieved and displayed humidity. 2 2
Retrieved and displayed wind direction. 2 2
Retrieved and displayed wind speed. 2 2
Retrieved and displayed barometric pressure. 2 2
Retrieved and displayed time information was updated. 3 3