Spellings Consulting

When you need IT done right.

HTTP Request Script

I recently thought that I would be nice to write a VB Script that could run as a scheduled task that would attempt to login to a data-driven web site and notify me via email if there was an unsuccessful login.  I figured that this would be a good way to pro-actively be notified if a client’s website had gone down (ie: if you can’t login, something has happened to the site).

The script sends an http request with form post data in the http header and waits for the HTTP server response.  It then looks for a specific string that will only appear in the response after a successful login, such as the username or a specific greeting that appears on the landing page.  If the expected string is not found, then the Vb Script sends an email (optional) and also writes the HTTP Server response to a local file with a unique name so that a user can inspect the responses for debugging and forensic purposes.

Download the script here and use it freely as long as you do not resell it, and you don’t blame me for unexpected results.

No comments yet. Be the first.

Leave a reply