模拟当前登录用户,请求自己网站
$header = 'Cookie: ' . $_SERVER['HTTP_COOKIE'];
$context['http'] = array
(
'method' => 'GET',
'header' => $header,
);
$xlsx = file_get_contents($url,false, stream_context_create($context));
$header = 'Cookie: ' . $_SERVER['HTTP_COOKIE'];
$context['http'] = array
(
'method' => 'GET',
'header' => $header,
);
$xlsx = file_get_contents($url,false, stream_context_create($context));
本文标题:PHP模拟当前登录用户,请求自己网站
本文链接:https://www.haomeiwen.com/subject/oqvlahtx.html
网友评论