<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http:
-->
$out
=
"POST $path HTTP/1.0\r\n"
;
$out
.=
"Accept: */*\r\n"
;
$out
.=
"Accept-Language: zh-cn\r\n"
;
$out
.=
"Content-Type: application/x-www-form-urlencoded\r\n"
;
$out
.=
"User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n"
;
$out
.=
"Host: $host\r\n"
;
$out
.=
"Content-Length: "
.
strlen
(
$post
).
"\r\n"
;
$out
.=
"Connection: Close\r\n"
;
$out
.=
"Cache-Control: no-cache\r\n"
;
$out
.=
"Cookie: $cookie\r\n\r\n"
;
$out
.=
$post
;
if
(!
$fp
) {
return
''
;
}
else
{
stream_set_blocking(
$fp
,
$block
);
stream_set_timeout(
$fp
,
$timeout
);
@fwrite(
$fp
,
$out
);
@fclose(
$fp
);
}