net_php_伪造host头

来源:互联网 发布:什么软件打开psd 编辑:程序博客网 时间:2024/06/08 09:00




$option=array( 'http' => array(    'header' =>    "Accept: */*\r\n".     "Accept-Language: zh-cn\r\n".     "Accept-Encoding: gzip, deflate\r\n".     "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; LBBROWSER)\r\n".     "Host: $host\r\n" .     "Connection: Keep-Alive\r\n" .     "Cookie: ASP.NET_SessionId=vkaywvyv0fryp3joh5kem155\r\n"   ));$url='http://*****';echo file_get_contents($url, false,stream_context_create($option));