# LoadVars with PHP in a password protected directory

**URL:** <https://forum.kirupa.com/t/loadvars-with-php-in-a-password-protected-directory/226450>\
**Category:** flash\
**Created:** [May 21, 2007, 3:40pm UTC](https://forum.kirupa.com/t/loadvars-with-php-in-a-password-protected-directory/226450 "2007-05-21T15:40:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmo518](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@rmo518](https://forum.kirupa.com/u/rmo518)\
**Post date:** [May 21, 2007, 3:40pm UTC](https://forum.kirupa.com/t/loadvars-with-php-in-a-password-protected-directory/226450/1 "2007-05-21T15:40:25Z")

</div>

I’m using the sendAndLoad method to load some data from a PHP script. The problem is (at least seems to be) that the site is a testing folder that is password protected - it requests a user name and password before you can look at anything in the directory.

So sometimes the script fails because (or as I said, it seems to be because) it’s not getting the user and name and password and so the request is denied.

First, does it sound like I have correctly diagnosed the problem?

Second, is there any way to send the username and password, perhaps using addRequestHeader? (I’ve taken a look at addRequestHeader but haven’t been able to make much sense of it yet.)

Thanks for any insight you have on this.
