php 构造http头 php模拟http请求 伪装头部信息
来源:互联网 发布:c语言简单病毒代码 编辑:程序博客网 时间:2024/05/21 04:18
http://jingyan.baidu.com/article/335530daafcd6019ca41c352.html
<?php
/**
构造 http 请求
*/
$filename="http://sj.mjerp.com/dabenying/?r=site/Userlogin&userName=a";
$host = "sj.mjerp.com";
$url = parse_url($filename);
echo '<pre>';
print_r($url);
$POST = <<<HEADER
GET /dabenying/?r=site/Userlogin&userName=a HTTP/1.1
Accept: text/plain, text/html
Referer: {$referer}
Accept-Language: zh-CN,zh;q=0.8
Content-Type: application/x-www-form-urlencodem
Set-Cookie: token=value; pub_sauth1=value;r=site/Userlogin; userName=a; pub_sauth2=value
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
Host: {$host}
Content-Length: 0
Pragma: no-cache
Cache-Control: no-cache
Connection: close\r\n
HEADER;
$fp = fsockopen($host,80,$errno,$errstr,30);
if ($fp)
{
echo '======<br>';
fwrite($fp, $POST);
echo 2;;
$result = '';
while(!feof($fp))
{
// receive the results of the request
echo fgets($fp),'<br>';
}
//echo $result;
}else{
echo 'failed';
}
fclose($fp);
- php 构造http头 php模拟http请求 伪装头部信息
- php构造http头部发送请求
- php设置http请求头信息和响应头信息
- PHP模拟发送POST请求之一、HTTP协议头部解析
- php根据Http请求头部信息下载文件
- PHP模拟http请求
- php模拟http请求
- PHP模拟HTTP请求
- PHP模拟http请求
- php模拟http请求
- PHP获取http头信息
- PHP获取http头信息
- PHP获取HTTP头信息
- php模拟HTTP协议请求
- PHP SOCKET模拟HTTP请求
- 02-http请求头部信息
- HTTP请求-头信息
- HTTP请求头信息
- TCP优化
- ImageIolder加载圆形图片
- 使用MyBatis(九)一对多的集合的嵌套查询
- docker中git和gerrit的使用小结
- 利用python进行数据分析-数据规整化2
- php 构造http头 php模拟http请求 伪装头部信息
- 视频编码:帧编码和场编码
- UDP优化
- 如何让捕鱼游戏打中的鱼变红。
- NFS服务器配置
- 献给初学者:谈谈如何学习Linux操作系统
- jsf学习之a4j组件
- linux中环境变量配置bashrc与profile的区别
- JavaBean