Validate Text on WebPage

Version 3

    This script will connect to a basic webpage and look for the supplied text on the page. I use this to validate that we are displaying the correct message to our users during maintenance periods.

    The times, URL and search string can be passed in as arguments if need be. The first line can be used for the arguments (remove "$args =" )

    The times can be modified to meet your needs. We happen to have two different maintenance windows.

    UPDATE: Added another argument for the day that will have it's own maintenance window. In this case it will validate the text on the webpage on Sunday from 00:00 to 06:00 and any other day from 02:00 to 02:30.