You can integrate the wordpress authentication with the apache webserver and then configure which additional resources need a login on your webserver. This works with PHP as well with HTML and images.
For more information, please see mod_auth_mysql and phpass.