If you have any classes, functions, ect. you need to move them behind the document root (same folder as public_html on most hosts). Then you just included them.
You need to add a php.ini file and protect it with .htaccess. This means you put your php configurations in the php.ini and disable people from viewing in their browser via .htaccess.
In your .htaccess file:
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Files php.ini>
order allow,deny
deny from all
</Files>
Also disable the directory listing so people cannot see what you have on the server.
Here is a good php.ini example:
output_buffering = Off
safe_mode = Off
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
log_errors = On
ignore_repeated_errors = On
html_errors = Off
error_log = /home/username/logs/php_error_log
default_charset = "utf-8"
file_uploads = On
upload_max_filesize = 100MB
post_max_size = 150MB
allow_url_fopen = On
register_globals = Off
magic_quotes_gpc = Off
session.name = SESSID
disable_functions = exec,shell_exec,passthrough,eval,phpinfo
php.ini usually only works on a per directory basis so if you have multiple folders that need the same configuration, you need copy the same php.ini into each directory. (Spent hours finding this one out)
If you do not have uploads on the site, make sure you turn file uploads to 'off'. Also, if you don't need to access remote urls then turn off allow_url_fopen.
Make sure you leave the error logging part of the ini file. This will make it so all errors are logged to a central location and not in the directory of the file which had the error. The reason for this is so hackers cannot see the errors of the site, which might help them hack it.
If you use sessions, make sure you change the location of where they are stored. If another account is compromised on the server, a hacker could get into the tmp directory where your sessions are and steal info/hijack a session.
Here is a link on changing it:
http://us3.php.net/manual/en/functio...-save-path.php
You can also do it through php.ini.
Make sure the directory where you are storing the sessions is not accessible to the public.
I wouldn't use http authentication with a .htpasswd file. At least use a database to store the login info. A login system with php (like cwarn23 said) would be best in my opinion. I posted a good example at:
http://www.daniweb.com/forums/thread212083.html