Um, can I take another stab at this?
Change your custom script to let the phpdig user-agent through without authentication.
Here is a thread that talks about how that's defined in phpdig.
So what you'd have for authentication is something like this:
PHP Code:
if ($_SERVER['USER-AGENT'] == 'PhPDig'){
page content
} else {
if ($goodauth !== "1"){
headerlocation to login.php
} else {
page content
}
Would that work for you?
You gotta give me an A for effort!