gzip编码? 没见过,帮你顶一下
解决方案 »
- javascript实现时间监控 请教各位大侠
- 100分求高手帮忙,不够再加!
- 我想采用smarttemplate的cache缓存功能,可是我担心缓存页面太多,比如1天就生成3万个缓存文件
- 高分求救!!! 读取页面内容!!!!
- Parse error: parse error, unexpected T_STRING 这是什么错误?
- 我的session为什么不可以做了?
- linux7.3下的mysql在php中是不是不支持的?mysql_connect()函数不支持,其它都还好
- 帮忙看一下这一个文件哪里出问题了?
- 求PHP的简易论坛代码 求大神!!!解决!
- thinkPHP联表查询
- 【新手问题】关于数组
- 请大家帮我测试一下一个网站速度
可能要解压
"取数据时,不要发送gzip头"
那应该怎样解码??谢谢
Accept-Encoding: gzip, deflate
,你改以下你的代码,去掉 Accept-Encoding: gzip, deflate 这个请求头就可以了
$text=gzuncompress($raw_gzip_data);
临时关闭压缩输出选项, (如注释掉 ebDeflateInit(TRUE); 一句即可)(2) 如果是 webserver 开启了压缩过滤, 则打开 apache 的配置文件, 注释
掉 mod_deflate 等相关选项, 即关闭输出压缩过滤器, 重启 apache.
请参考 apache mod_deflate 相关配置.(3) 用 httplook 抓包, 记住选中 "Decode compressed entities" 选项.
抓到压缩的数据, 它会解开显示.
结果如下例所示, "Message body has been unpacked." 即表已经解包显示.[code]
HTTP/1.1 200 OK
Date: Sun, 29 Apr 2007 09:39:49 GMT
X-Powered-By: CSP/eybuild-2.3.0
Content-Encoding: gzip
Content-Length: 903
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
<html>
<head>
<META content=no-cache http-equiv=pragma>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="wed, 26 Feb 1997 08:21:57 GMT" http-equiv=expires>
<title>BBR 登录(V1.1.0)</title>
<style>
<!--
p, td, div, b { font-size: 11pt; }
td {height: 35px;}
div { color: red }
#title {font-size: 16px; color: #663300; width: 90px; }
#text { width: 150px; }
a:link {color: #000066; text-decoration: none}
a:visited {color: #000066; text-decoration: none}
a:hover {color: #FF0000; text-decoration: underline}
a:active {color: #000066; text-decoration: underline}
-->
</style>
<script language=JavaScript><!--
if (top.location !== self.location){top.location.href=self.location;}
function set_focus() {
document.forms[0].elements[1].focus();
}
-->
</script>
</head>
<body onload="set_focus();">
<p style="margin-top: 80px">
<center>
<form action="" method=post>
<table width=300 border=1 cellpadding="2" cellspacing="0" bordercolor="#EA8A1C">
<tr>
<td height=40 colspan=2 bgcolor="#FFDA00"><strong>登录到 Broadband Router:</strong></td>
<tr>
<td id="title">用户名:</td>
<td height=30><input id="text" type=text name=usrname size=12 value="user"></td>
<tr>
<td id="title">口 令:</td>
<td height=30><input id="text" type=password name=passwd size=12 value="user"></td>
<tr>
<td colspan=2 align=center><input type=submit name=login value="提 交"></td>
</table>
</FORM><div>
[ <A href="?!=/login.csp&lang=ch" target=_top>中文</A> |
<A href="?!=/login.csp&lang=en" target=_top>English</A> |
<A href="?!=/login.csp&lang=jp" target=_top>日本語</A> ]
</div>
<p style="margin-top: 30px">(来自 http://www.eybuild.com)</p>
</center>
</body>
</html>Message body has been unpacked.
[/code]Good Luck!