I tried the following include("http://user:pass@site.com"); Code (markup): that failed. was told php only uses http1.0. tried curl: $ch = curl_init("http://user:pass@site.com"); $fp = fopen("smoo.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); Code (markup): smoo.txt has the contents: <b>Digest authentication failed.</b> Code (markup): so how CAN this be done?
$url = "http://www.site.com/restricted"; $fp = fopen("smoo.txt", "w"); $ch = curl_init(); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERPWD, "user:pass"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); PHP: