curl-library
Curl to .htaccess problem - passing id/passwd to subdirectories
Date: Thu, 02 Jul 2009 09:38:16 -0400
Hello -
Using the code below I can pass an id/password to an .htacss/.htpasswd file
and log directly into a secured page. But when I click on any link which
also goes to that (previously secured directory) I am prompted to manually
enter the id/password again. I though that the UNRESRICTED_AUTH parameter
would do what I need, but no luck. Any ideas would be gratefully
appreciated.
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 1);
//dhf changes
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 9);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
//curl_setupt($ch, CURLOPT_SSL_VERIFYHOST,0);
//
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
//curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_URL,$PP_URL);
//curl_setopt($ch, CURLOPT_USERPWD,$PP_ID.":".$PP_PASSWD);
-- President - Hypermedia Design - dickfleming_at_hypermediadesign.com dickfleming_at_hypermediadesign.com Chief Operating Officer - Collaboration Studios dickfleming_at_collabortionstudios.com 207-348-5230 (voice) 207-669-8375 (FAX) www.hypermediadesign.com www.collaborationstudios.com --CS Finalist in TechMaine's "TECHNOLOGY COMPANY OF THE YEAR AWARD" !!! Read all about it: http://www.collaborationstudios.comReceived on 2009-07-02