答案 0 :(得分:10)
答案 1 :(得分:2)
答案 2 :(得分:1)
答案 3 :(得分:1)
任务 - 使用基本的http身份验证。
$auth_header = 'Authorization: Basic '.base64_encode("$user:$password");
$f = fopen($url, $open_mode,false, stream_context_create(
'http'=>array(
'header' => array($auth_header,$some_other_header,$some_yet_header),
),
));