// ******************************************************************* // The SuperGrabber! 2.2 // http://www.bannerdots.com/scripts/scripts.html // // Copyright (c) 2000,2001 BannerDots Inc. // // Please see the examples of config in demo files included in the packge // ******************************************************************* $posturl= $_REQUEST['newurl']; $query= $_SERVER['QUERY_STRING']; $ref=$_SERVER['HTTP_REFERER']; $remaddr=$_SERVER['REMOTE_ADDR']; $script = $_SERVER["SCRIPT_NAME"]; $path = substr($script, 0, strrpos($script, ".")); if ( $query == "" ) { $url = "http://www.kannux.com$path.asp?remote_addr=$remaddr&HTTP_REFERER=$ref&alternatedomain=true"; } Else{ $url = "http://www.kannux.com$path.asp?$query&remote_addr=$remaddr&HTTP_REFERER=$ref&alternatedomain=true"; } preg_match("/^(https?:\/\/)?([^\/]*)(.*)/i", "$url", $matches); $domain = "http://" . $matches[2]; $page = $matches[3]; $fd = fopen($domain.$page, "rb"); $code = ""; $linecounter = 0; while(!feof($fd) And $linecounter < 100){ $code .= fread($fd, 4096); $linecounter = $linecounter + 1; } fclose($fd); $start= strpos($code, ""); $finish= strpos($code, ""); $length= $finish-$start; $code=substr($code, $start, $length); $newcode = preg_replace("/(href=\"?)(\/[^\"\/]+)/", "\\1" . $domain . "\\2",$code); echo $newcode; ?>