要发送的编码:Ozs+Oz4+Oz4+Oz4+O2w8SGVhZDE6aW1nYnRfU2VhcmNoO2ltZ2J0X2Rvd25sb2FkOz4+iI2f2xpLK6SyvRR3knp34fEanZw=
收到的编码:Ozs+Oz4+Oz4+Oz4+O2w8SGVhZDE6aW1nYnRfU2VhcmNoO2ltZ2J0X2Rvd25sb2FkOz4+iI2f2xpLK6SyvRR3knp34fEanZw=
2d602d60这个哪来的啊,把=号过滤掉就没问题了。高手们告诉我一下原因吧!!,谢谢!!foreach($data as $k=>$v) {
$post .= $k.'='.rawurlencode($v).'&';
}$port = $matches['port'] ? $matches['port'] : 80;
if($referer == '') $referer = URL;
$out = "$this->method $path HTTP/1.1\r\n";
$out .= "Accept: */*\r\n";
$out .= "Referer: $referer\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "User-Agent: ".$_SERVER['HTTP_USER_AGENT']."\r\n";
$out .= "Host: $host\r\n";
if($this->cookie) $out .= "Cookie: $this->cookie\r\n";
if($this->method == 'POST') {
$out .= $this->ContentType;
$out .= "Content-Length: ".strlen($this->post)."\r\n";
$out .= "Cache-Control: no-cache\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= $this->post;
} else {
$out .= "Connection: Close\r\n\r\n";
}
echo $out;
if($timeout > ini_get('max_execution_time')) @set_time_limit($timeout);
$fp = @fsockopen($host, $port, $errno, $errstr, $timeout);
if(!$fp) {
$this->errno = $errno;
$this->errstr = $errstr;
return false;
} else {
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
fwrite($fp, $out);
$this->data = '';
$status = stream_get_meta_data($fp);
收到的编码:Ozs+Oz4+Oz4+Oz4+O2w8SGVhZDE6aW1nYnRfU2VhcmNoO2ltZ2J0X2Rvd25sb2FkOz4+iI2f2xpLK6SyvRR3knp34fEanZw=
2d602d60这个哪来的啊,把=号过滤掉就没问题了。高手们告诉我一下原因吧!!,谢谢!!foreach($data as $k=>$v) {
$post .= $k.'='.rawurlencode($v).'&';
}$port = $matches['port'] ? $matches['port'] : 80;
if($referer == '') $referer = URL;
$out = "$this->method $path HTTP/1.1\r\n";
$out .= "Accept: */*\r\n";
$out .= "Referer: $referer\r\n";
$out .= "Accept-Language: zh-cn\r\n";
$out .= "User-Agent: ".$_SERVER['HTTP_USER_AGENT']."\r\n";
$out .= "Host: $host\r\n";
if($this->cookie) $out .= "Cookie: $this->cookie\r\n";
if($this->method == 'POST') {
$out .= $this->ContentType;
$out .= "Content-Length: ".strlen($this->post)."\r\n";
$out .= "Cache-Control: no-cache\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= $this->post;
} else {
$out .= "Connection: Close\r\n\r\n";
}
echo $out;
if($timeout > ini_get('max_execution_time')) @set_time_limit($timeout);
$fp = @fsockopen($host, $port, $errno, $errstr, $timeout);
if(!$fp) {
$this->errno = $errno;
$this->errstr = $errstr;
return false;
} else {
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
fwrite($fp, $out);
$this->data = '';
$status = stream_get_meta_data($fp);
似乎唯一的办法,就是构建适当的header发送过去。