Hey Rick,
I have the exact code in my Pro Drupal development book at home, I can
look it up for you tomorrow if you are still stuck.
From what I remember you just need to include the following two
statements in your PHP file:
include_once "includes/bootstrap.inc";
include_once "includes/common.inc";
Basically from what I remember, the page is secured by utilizing the
bootstrap process and then variables are exposed to the page via
common.inc??
The book is here:
http://www.apress.com/book/view/9781590597552. And
the chapter you want to look at is the one on security.
Cheers,
Justin.