Woody’s PHP Scripts
I wrote the following script to learn PHP and also to learn how to decode a weather METAR observation statement.
Please feel free to use, copy and/or modify this script for your needs. I have posted this script for people to use and to learn from.
The NWS post hourly weather information from airports around the world in a weather observation statement called a METAR. Given a four-letter station code, the weather data from any station can be decoded. This script reads a METAR file from the NWS server and decodes it into usable information. The script is well documented and should be easy to modify for metric units or incorporated into a more presentable web page.
This function returns an xhtml image tag of a different icon for each week of Advent, or a single icon during the twelve days of Christmas. All dates needed are automatically calculated for the current Advent and Christmas season. (Need four different images for Advent plus an image for Christmas.)
This function capitalizes the words in a title according to the MLA Handbook, that is, no articles, prepositions, and conjunctions are capitalized. (I also added any forms of the verb ‘to be’.)
The purpose for this script is to replace the directory listing provided by the server if no index page is present. This php script will list only filenames with certain extensions, i.e. .html, .php, .css, etc. The list of viewable extensions is easy to edit within the script. No folders or sub-directories are listed, nor is any file named “index”. The idea of this script is to renamed it as index.php, and placed in the directory you want to limit the information of the types of files.