One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/usr/bin/env python3 | |
| # usage: aoty [year] | |
| # | |
| # This script collects all the albums of the year for Alf's awesome | |
| # AOTY site http://apps.hubmed.org/aoty and prints out the albums | |
| # that appear on more than one Album of the Year list. | |
| # | |
| # You'll need beautifulsoup4 and requests to run this. |
| <?php | |
| //get and set url protocol | |
| $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://'; | |
| //set and sanitize global variables for URL construction | |
| $server = isset($_SERVER['SERVER_NAME']) ? htmlentities(strip_tags($_SERVER['SERVER_NAME'])) : null; | |
| $path = isset($_SERVER['PHP_SELF']) ? htmlentities(strip_tags(dirname($_SERVER['PHP_SELF']))) : null; | |
| $fileName = isset($_SERVER['SCRIPT_NAME']) ? htmlentities(strip_tags(basename($_SERVER['SCRIPT_NAME']))) : null; | |
| $fileNameURI = isset($_SERVER['REQUEST_URI']) ? htmlentities(strip_tags($_SERVER['REQUEST_URI'])) : null; | |
| $fileExtension = isset($_SERVER['PATH_INFO']) ? pathinfo($fileName, PATHINFO_EXTENSION) : null; |