Forge HTTP_REFERER code in PHP "> <LINKhref =" http://www.php100.com//statics/style/headfloor_950_081205.css "type = text/cssrel = stylesheet> <LINKhref =" http://www.php100.com
- Error_reporting (E_ERROR | E_WARNING | E_PARSE );
- Set_time_limit (0 );
-
- $ Server = 'www .php100.com '; // IP address
- $ Host = 'www .php100.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"
Unable to connect to remote server
$ Errstr ($ errno)
\ N ";
- }
- Else {
- $ Strhead = "GET $ target HTTP/1.1 \ r \ n ";
- $ Strhead. = "Host: $ host \ r \ n ";
- // $ Strhead. = "Cookie: PHPSESSIONIDSQTBQSDA = DFCAPKLBBFICDAFMHNKIGKEG \ r \ n ";
- $ Strhead. = "Referer: $ referer \ r \ n ";
- $ Strhead. = "Connection: Close \ r \ n ";
-
- Fwrite ($ re, $ strhead );
- While (! Feof ($ re )){
- Echo fgets ($ re, 128 );
- }
- Fclose ($ re );
- }
-