fsockopen 伪造 post和get方法哦,如果你正在找 伪造 post和get方法的php处理代码这款不错哦。
复制代码 代码如下:
<?php
//fsocket模拟post提交
$purl = “http://localhost/netp个人履历表hp/test2.php?uu=rrrrrrrrrrrr”;
print_r(par_url($url));
sock_post($purl,”uu=55555555555555555″);
//fsocket模拟get提交
function sock_get($url, $query)
{
$info = par_url($url);
$fp = fsockopen($info[“host”], 80, $errno, $errstr, 3);
$head = “get “.$info[‘path’].”?”.$info[“query”].” http/1.0rn”;
$head .= “host: “.$info[‘host’].”rn”;
$head .= “rn”;
$write = fputs($fp, $head);
while (!feof($fp))
{
$line = fread($fp,4096);
echo $line;
}天津教资
}
sock_post($purl,”uu=rrrrrrrrrrrrrrrr”);
function sock_post($url, $query)
{
$info = par_url($url);
$fp = 幼儿园科学教案fsockopen($info[“host”], 80, $errno, $errstr, 3);
$head = “post “.$info[‘path’].”?”.$info[“query”].” http/1.0rn”;
$head .= “host: “.$info[‘host’].”rn”;
$head .= ̶battle是什么意思0;referer: http://”.$info[‘host’].$info[‘path’].”rn”;
$head .= “conten郭映t-type: application/x-www-form-urlencodedrn”;
$head .= “content-length: “.strlen(trim($query)).”rn”;
$head .= “rn”;
$head .= trim($query);
$write = fputs($fp, $head);
while (!feof($fp))
{
$line = fread($fp,4096);
echo $line;
}
}
?>
本文发布于:2023-04-06 10:34:21,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/499d233b03fffe7ef68278ff5952b52a.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:php fsockopen伪造post与get方法的详解.doc
本文 PDF 下载地址:php fsockopen伪造post与get方法的详解.pdf
留言与评论(共有 0 条评论) |