欢迎访问 水平网, 今天是:2010年09月09日 [订阅本站] [用户注册/登录] [收藏本站]
首     页 技术文章 注 册 码 代码仓库 资源下载 技术讨论 实用工具 站内搜索 联系我们
■ 站内搜索
■ 专题分类
■ 推荐文章
■ 热点文章
■ 相关文章
  • 无相关文章
■ 当前位置:首页 >> 技术文章 >> 网页编程 >> PHP技术 >> 文章内容

探测httpheader头

<?php /****************************************************
program : Spr2[detect_httpheader]
Author : uchinaboy
E-mail : uchinaboy@163.com
QQ : 16863798
Date : 2001-7-25
****************************************************/
$host = "www.infojet.com.cn";
$port = "80"; $path = "/yuhu/";
$filename = "talk0.asp";
$datestream = "sdjahsdjkhaksjd";
$length = strlen($datestream);
$header = "POST ${ path}$filename HTTP/1.1n";
$header.= "HOST: $hostn";
$header.= "Content-Type: application/x-www-form-urlencodedn";
$header.= "Content-Length: $lengthnn";
$header.= "$datestream";
function sock() { global $host, $port, $header;
$fsocket = @fsockopen($host, $port, &$errno, &$errstr);
if(!$fsocket) { echo "$errstr ($errno)n"; }else { fputs($fsocket, $header);
while(!feof($fsocket)) {
$res = fread($fsocket, 128);
echo $res; }
}
fclose($fsocket);
}
set_time_limit(0);
sock();
?>
TAGS:httpheader
■ 发表评论
您的称呼:
联系方式:
验 证 码 : 看不清楚?点击刷新验证码 看不清楚?点击图片刷新验证码
■ 最新评论显示所有评论