I need to be able to protect a directory so that only my PHP script can access it. (I have files in there that I don't want to have downloaded unless I know about it.)

How can I give my PHP script the username and password to access this file?

or would it be better if I did an FTP sort of thing? How would I do this?

Squirrelly1