时间:2021-07-01 10:21:17 帮助过:7人阅读
- error_reporting( E_ERROR | E_WARNING | E_PARSE );
- set_time_limit(0);
- $server = www.2cto.com; // IP address
- $host = www.2cto.com; // Domain name
- $target = /test.php?x=1; // Specific program
- $referer = http://www.php100.net/down/redirect.php?x=downurl&id=39&urlid=65; // Referer
- $port = 80;
- $re = fsockopen($server, $port, $errno, $errstr, 30);
- if (!$re){
- echo "<h1>无法连接远程服务器h1><h3>$errstr ($errno)h3/> ";
- }
- else {
- $strhead = "GET $target HTTP/1.1 ";
- $strhead .= "Host: $host ";
- //$strhead .= "Cookie: PHPSESSIONIDSQTBQSDA=DFCAPKLBBFICDAFMHNKIGKEG ";
- $strhead .= "Referer: $referer ";
- $strhead .= "Connection: Close ";
- fwrite($re, $strhead);
- while (!feof($re)){
- echo fgets($re, 128);
- }
- fclose($re);
- }
http://www.bkjia.com/PHPjc/486043.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486043.htmlTechArticleerror_reporting(E_ERROR|E_WARNING|E_PARSE); set_time_limit(0); $ server = www.2cto.com ;//IPaddress $ host = www.2cto.com ;//Domainname $ target = /test.php?x=1 ;//Specificprogram...