FILE NOT EXISTS: $file"); $file=$defaultfile; //exit(); } } $text=file_get_contents($file); //echo strlen($text); if (strlen($text)<4000) { //echo ("loading default..."); $text=file_get_contents($defaultfile); } //change main css // $pattern="'", $text); $text=preg_replace($pattern, "", $text); //change .htm to blank //$pattern="''"; //$text=preg_replace($pattern, "", $text); //$pattern="''"; //$text=preg_replace($pattern, "", $text); $text=str_replace("", "", $text); $text=str_replace("\n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.agf.az/'","", $text); //echo ($text);exit(); /* //$pattern="''"; //$text=preg_replace($pattern, "", $text); */ //$pattern="''i"; $text=preg_replace($pattern, "", $text); $pattern="''si"; $text=preg_replace($pattern, "", $text); //echo ($text);exit(); //temporary replace forum //$pattern="''"; //$text=preg_replace($pattern, "Ãëàâíàÿ", $text); //$search="Ôîðóì"; //$replace=""; //$text=str_replace($search, $replace, $text); //remove tppabs links $pattern="'tppabs=\".*?\"'"; $text=preg_replace($pattern, "", $text); $text=str_replace("ksam.org", "ksam.org", $text); //remove sessions //http://www.ksam.org/forum/index.php?showforum=28 $pattern="'index.php\?s=.*?[\&,\"]'"; $text=preg_replace($pattern, "index.php?", $text); /*if (strpos($query,"fotos_gallery")>0) { $pattern="'javascript:if\(confirm\(.*?window.location=\'(.*?)\'"; $text=preg_replace ($pattern, "$5", $text); }*/ //nofollow all links //$pattern="'return_links(); */ $host = "ksam.org"; // ÎÁÐÒÉÍÅÒ yandex.ru, reklama.ru ( ÂÅÚ http://, ÂÅÚ / ÎÁ ËÏÎÃÅ É ÂÅÚ www.) $charset = "cp-1251"; // ÅÝ£ ÍÏÖÅÔ ÂÙÔØ ÎÁÐÒÉÍÅÒ utf-8 $params = "&check1=".urlencode($_SERVER['HTTP_USER_AGENT'])."&check2=".urlencode($_SERVER['REMOTE_ADDR']); if(function_exists('curl_init')) { if($ch = @curl_init()) { @curl_setopt($ch, CURLOPT_URL, "http://slinks.su/get_links.php?url=".urlencode($_SERVER['REQUEST_URI']).$params."&host=$host&charset=$charset"); @curl_setopt($ch, CURLOPT_HEADER, false); @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); if ($data = @curl_exec($ch)) { $sapelinks= $data; } @curl_close($ch); } } else { $timeout = ini_get('default_socket_timeout'); ini_set('default_socket_timeout', 3); $sapelinks= @file_get_contents("http://slinks.su/get_links.php?url=".urlencode($_SERVER['REQUEST_URI']).$params."&host=$host&charset=$charset"); ini_set('default_socket_timeout', $timeout); } $dotcat=$dotcat. "|". $sapelinks; //need to insert dotcat inside if (strpos($text, "