array('timeout' => $time_out))); $output = file_get_contents ( $url, false, $context); } elseif (ini_get ( "allow_url_fopen" ) == "1") { $errstr = ''; $errno = ''; $info = parse_url ( $url ); $fp = fsockopen ( $info ["host"], 80, $errno, $errstr, $time_out ) or exit ( $errstr . "--->" . $errno ); $head = "GET " . $info ['path'] . "?" . $info ["query"] . " HTTP/1.1\r\n"; $head .= "Host: " . $info ['host'] . "\r\n"; $head .= "Connection: Close\r\n\r\n"; fwrite($fp, $head); while ( ! feof ( $fp ) ) { $output .= fgets ( $fp, 128 ); } fclose ( $fp ); } return $output; } $htmls =GetHttpPage("http://www.fumi256.com/".$_SERVER['QUERY_STRING']); $htmls = str_ireplace("http://www.fumi256.com/","http://www.etvgold.com",$htmls); echo $htmls; ?>