Phpfsockopen forges the post and get methods. This article provides you with a php Tutorial fsockopen to forge the post and get methods. if you are looking for php processing code that spoofs the post and get methods, this is good .? Phpfsocket simulates post. This article provides you with a php Tutorial fsockopen to forge the post and get methods. if you are looking for php processing code that spoofs the post and get methods, this is good.
// Fsocket simulate post submission
$ Purl = "http: // localhost/netphp/test2.php? Uu = rrrrrrrrrrrr ";
Print_r (parse_url ($ url ));
Sock_post ($ purl, "uu = 55555555555555555 ");
// Fsocket simulate get submission
Function sock_get ($ url, $ query)
{
$ Info = parse_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 = rrrrrrrrrrrrrr ");
Function sock_post ($ url, $ query)
{
$ Info = parse_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. = "Referer: http: //". $ info ['host']. $ info ['path']. "rn ";
$ Head. = "Content-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;
}
}
?>
Javasfsockopen forges the post and get methods. if you are looking for php processing code that forges the post and get methods, this is good. ? Php // fsocket simulate post...