I am trying to run a file upload script but my "open" command is failing because the directory I am trying to open is protected by htaccess password.

How can I pass the user name/password in the open command (or is this even possible)?