Paging Through Web Pages
By Tim Pozar
Was it the geek in me, or my role as the director of operations at Bright Light that prompted me to solve that nagging remote-monitoring problem? Sometimes it's hard to know where ideas like these come from, but this one is kind of fun. Pay attention as I show you how you can surf the Web remotely. It's great for system monitoring, getting stock quotes, and checking weather reports, to name a few. Best of all, you can do it all through your pager!
First you need a two-way alpha pager that can send and receive Internet email. I use SkyTel's service with a Glenayre pager (see "
Online"). With two-way alpha pagers you can "type" in a recipient's address and a message by moving a cursor over a field of characters and picking the letter you want. You won't get up to 40 words per minute with this method, but it gets the job done.
This particular hack relies on using a Perl script that will accept mail from UNIX standard input. The script then parses the header of the mail for the sender's email address, and looks through the message body for the the URL that the sender wants to retrieve. The script runs Lynx to get the page at the given URL, reformats the output, and mails it back to your pager.
Walking through the code in
Listing One, you'll see that the script opens up a couple of logs for debugging, and then starts to parse the mail.