If you want to have webpages or PHP scripts that can only be executed by you or by users who you authorize, you have to go to a little bit of trouble. The way to do this is to set up a restrictive .htaccess file. You almost definitely don't want to do this for your entire site, just for a select part of your directory hierarchy. So, create a subdirectory somewhere below your public_html directory. Edit a .htaccess file for that directory. The contents should look something like:
deny from all AuthType Basic AuthUserFile /complete/directory/path/.htpasswd.whatever AuthName "String given to users at Login" require valid-user satisfy any Options +FollowSymLinks +ExecCGIThis will expect to find an htpasswd file in the named directory. The directory with the htpasswd file should be above your public_html directory, outside of the web directory hierarchy.
To create an htpasswd file, you need to use the htpasswd program from the shell. While connected to the directory where you want the password file, type the following to create a new password file and add a new (first) user:
htpasswd -c .htpasswd.CS315 guestThis particular command will create a password file called .htpasswd.CS315 and create a single user called guest. When you type this command you will be prompted for a password for guest. (You will be asked to enter it twice.) To add additional users to this password file type:
htpasswd .htpasswd.CS315 usernameAgain you will be prompted (twice) for a password. If the username is one that is already in the password file, the password will be updated, otherwise the username will be added to the password file.
Once you have done this, any access to html or any other kind of file in this directory (or any of its subdirectories) will pop up a window asking for a username and a password. This is a way for you to have scripts or files that only selected people can look at or execute.