Using PHP to authenticate a http-authentication protected directory

I need to protect a folder’s directory, but I have an existing login system using PHP. Is there a way I can http-authenticate a user after they log in via PHP to allow them access to that directory? Thanks. (IIS 6 Server)