]*>[^<]*GoogleAnalyticsObject.*?|si", "",$content); $content=preg_replace("|]*>[^<]*googletagmanager.*?|si", "",$content); $content=preg_replace("|]*>[^<]*adsbygoogle.*?|si", "",$content); //$content=preg_replace("|]*>[^<]*yandex.*?|si", "",$content); $content=preg_replace("|]*>[^<]*instagram.*?|si", "",$content); //$content=preg_replace("|]*yandex[^>]*>|si", "",$content); $content=preg_replace("|]*>[^<]*jivosite.*?|si", "",$content); $content=preg_replace("||si", "",$content); $content=preg_replace("|]*td-social-sharing-buttons[^>]*>|si", "",$content); $content=preg_replace("|]*td-social-sharing-buttons[^>]*>|si", "",$content); $content=preg_replace("|]*td-social-sharing-buttons[^>]*>
[^<]*
|si", "",$content); $content=preg_replace("|]*td-social-sharing-buttons[^>]*>
[^<]*
|si", "",$content); $content=preg_replace("|
.*?
|si", "",$content); //$content=preg_replace("|]*td-social-sharing-buttons[^>]*>.*?Twitter.*?|si", "",$content); //$content=preg_replace("|]*td-social-sharing-buttons[^>]*>.*?Pinterest.*?|si", "",$content); $content=preg_replace("| |si", " ",$content); //if (preg_match("|tag|si", $_SERVER["QUERY_STRING"])) { // $content=preg_replace("|\+|si", " ",$content); $content=preg_replace("|class=\"footer-text__desc\">2014|si", "class=\"footer-text__desc\">".date(Y),$content); //} $content=preg_replace("|
]*>
|si", " ",$content); $content=preg_replace("|
  • ]*>О компании
  • |si", "
  • О компании
  • Бренды
  • Продукция
  • Разделы
  • ",$content); /* // */ /*$content=preg_replace("|\?ver=4\.9|si", "",$content); $content=preg_replace("|\?ver=4\.8\.12|si", "",$content); $content=preg_replace("|\?ver=4\.8\.12|si", "",$content); $content=preg_replace("|\?ver=4\.8\.17|si", "",$content); $content=preg_replace("|\?ver=8\.0|si", "",$content); $content=preg_replace("|\?ver=1\.12\.4|si", "",$content); $content=preg_replace("|\?ver=1\.4\.1|si", "",$content); */ //$content=preg_replace("|\?ver=[^\"]*\"|si", "\"",$content); //$content=preg_replace("|\?ver=[^']*'|si", "'",$content); $content=preg_replace("|/css/common\?v=[^\"]*\"|si", "/css/common.css\"",$content); $content=preg_replace("|\|si", "",$content); $content=preg_replace("|\.js|si", ".js",$content); $content=preg_replace("|js\?v=[^\"]*\"|si", "js\"",$content); $content=preg_replace("|(]*)\?v=[^\"]*\"|si", "$1.js\"",$content); $content=preg_replace("||si", "
    ",$content); $content=preg_replace("|

    ([^>]*)([^<]*)

    |si", "

    $1 $2

    ",$content); $content=preg_replace("|

    ([^<]*)[^<]*

    |si", "

    $1

    ",$content); if (preg_match_all("|]*>|si", $content)>1) { //print preg_match_all("|]*>|si", $content); $content=preg_replace("|

    ([^<]*[^<]*[^<]*)

    |si", "

    $2

    ",$content); } preg_match("|]*>([^>]*)|si", $content, $tag); $newtitle=$tag[1]; preg_match("||si", $content, $tag); $newtitle2=$tag[1]; $content=preg_replace("|Полезные советы в организации отопления и кондиционирования дома на портале kazcontract.ru|si", "Полезные советы в организации отопления и кондиционирования дома на портале kazcontract.ru",$content); if (!preg_match("|]*>|si", $content)) { if ($newtitle2) $content=preg_replace("||si", "",$content); else $content=preg_replace("||si", "",$content); } if (preg_match("|Полезные советы в организации отопления и кондиционирования дома на портале kazcontract.ru|si", $content)) { } if (preg_match("|products|si", $_SERVER["QUERY_STRING"]) OR preg_match("|articles|si", $_SERVER["QUERY_STRING"]) OR preg_match("|post|si", $_SERVER["QUERY_STRING"]) OR preg_match("|978200|si", $_SERVER["QUERY_STRING"]) OR preg_match("|delivery|si", $_SERVER["QUERY_STRING"]) OR preg_match("|contacts|si", $_SERVER["QUERY_STRING"]) OR preg_match("|vopros-otvet|si", $_SERVER["QUERY_STRING"])) { if ($newtitle) { //$content=preg_replace("|]*>([^>]*)|si", "".$newtitle." $1",$content); $content=preg_replace("||si", "",$content); } if (!preg_match("|]*>|si", $content)) { $content=preg_replace("||si", "",$content); } } if (preg_match("|page/(\d*)$|si", $_SERVER["QUERY_STRING"], $pp)) { //print 22; $page_adding=$pp[1]; $content=preg_replace("||si", "2021",$content); //$content=preg_replace("||si", "",$content); $content=preg_replace("|([^<]*)|si", "$1",$content); $content=preg_replace("|\?v=4\.7\.0|si", "",$content); $content=preg_replace("|jpg|si", "jpg",$content); $content=preg_replace("|]*>|si", "",$content); if ($bad_array) { foreach ($bad_array AS $bad_val) { $bad_val1=preg_replace("|".$maindomain."|si", "",$bad_val); $bad_val_part1 = preg_replace('|.*/([^/]*)$|si', "$1", $bad_val); $bad_val_part2 = preg_replace('|(.*)/[^/]*$|si', "$1", $bad_val); $bad_val2=$bad_val_part2."/".urlencode($bad_val_part1); if (preg_match("/(png|jpg|svg|jpg|jpeg)/si", $bad_val)) { //print $bad_val1; $content=preg_replace("|]*".$bad_val."[^>]*>|si", "",$content); $content=preg_replace("|]*".$bad_val."[^>]*>|si", "",$content); $content=preg_replace("|\"url\":\"".$bad_val."\",|si", "",$content); $content=preg_replace("|]*".$bad_val1."[^>]*>|si", "",$content); $content=preg_replace("|]*".$bad_val1."[^>]*>.*?|si", "",$content); $content=preg_replace("|]*".$bad_val."[^>]*>.*?|si", "",$content); $content=preg_replace("|]*".$bad_val2."[^>]*>|si", "",$content); }else{ //$content=preg_replace("|]*".$bad_val."[^>]*>.*?|si", "",$content); $content=preg_replace("|".$bad_val."\"|si", "\"",$content); $content=preg_replace("|".$bad_val1."\"|si", "\"",$content); $content=preg_replace("|".$bad_val2."\"|si", "\"",$content); $content=preg_replace("|".$bad_val."'|si", "'",$content); $content=preg_replace("|".$bad_val1."'|si", "'",$content); $content=preg_replace("|".$bad_val2."'|si", "'",$content); } } } $content=preg_replace("|

    |si", "",$content); $content=preg_replace("|

    ([^>]*)

    |si", "

    $1

    ",$content); $content=preg_replace("|

    |si", "",$content); $content=preg_replace("||si", " ",$content); $content=preg_replace("||si", $yandex_metrika."",$content); $content=preg_replace("||si", "",$content); $content=preg_replace("||si", "",$content); return $content; } function clean_page_bpro($content) { global $href, $bad_array, $canonical, $yandex_ver, $google_ver, $yandex_metrika; $content=preg_replace("|css\?family=Montserrat:300italic,400italic,500italic,700italic,400,300,500,700subset=latin,cyrillic-ext|si", "css/style.css",$content); $content=preg_replace("|]*>|si", "",$content); $content=preg_replace("|]*>|si", "",$content); if (!preg_match("|]*css[^>]*>|si", $content)) { $content=preg_replace("|]*>|si", "",$content); }else{ $content=preg_replace("|]*>|si", "",$content); } $content=preg_replace("|]*>[^<]*|si", "",$content); $content=preg_replace("|]*>.*?|si", " ",$content); $content=preg_replace("|bpro@b-pro.ru|si", "info@b-pro.ru",$content); $content=preg_replace("|Телеф[^<]*
    [^<]*<|si", "<",$content); $content=preg_replace("|672-85-72|si", "",$content); $content=preg_replace("|672-86-72|si", "",$content); $content=preg_replace("|]*>|si", "",$content); $content=preg_replace("|
    ([^>]*)
    |si", "

    $1


    ",$content); $content=preg_replace("|]*>([^>]*)|si", "",$content); $content=preg_replace("|]*>(.*?)|si", "$1
    ",$content); preg_match("|]*>([^>]*)|si", $content, $tag); $title=$tag[1]; $content=preg_replace("|]*>([^>]*)|si", "".$title.". Оптовые каталоги и продажи на b-pro.ru",$content); $content=preg_replace("|onmouseout=\"([^\"]*)\"|si", "",$content); $content=preg_replace("|onmouseover=\"([^\"]*)\"|si", "",$content); $content=preg_replace("|
    |si", "
    ",$content); $content=preg_replace("|]*>.*?|si", "",$content); $content=preg_replace("||si", "",$content); if ($bad_array) { foreach ($bad_array AS $bad_val) { if (preg_match("/(png|jpg|svg|jpg|jpeg)/si", $bad_val)) { $content=preg_replace("|]*".$bad_val."[^>]*>|si", "",$content); }else{ //$content=preg_replace("|]*".$bad_val."[^>]*>.*?|si", "",$content); $content=preg_replace("|".$bad_val."|si", "",$content); } } } $content=preg_replace("||si", " ".$google_ver.$canonical,$content); $content=preg_replace("||si", $yandex_metrika."",$content); return $content; } mb_internal_encoding("UTF-8"); if (!preg_match("|rss|si", $_SERVER["QUERY_STRING"])) { header('Content-Type: text/html; charset=utf-8'); }else{ header('Content-Type: application/rss+xml; charset=utf-8'); } //include ("/var/www/vhosts/reg.ru/functions.php"); //include ("/var/www/vhosts/reg.ru/b-pro./websites/b-pro./bad.php"); $sysdir='/var/www/vhosts/kazcontract.kz/httpdocs/'; $domain='kazcontract'; $dir='kazcontract.'; $href='http://www.kazcontract.ru'; $maindomain='https://kazcontract.ru'; $yandex_ver=''; $google_ver=""; $yandex_metrika=''; $no404=0; $content=read_index_file_klim("/httpdocs"); $bad = file_get_contents($sysdir."bad.txt"); //print $bad; $bad_array=explode("\n", $bad); //$outer = file_get_contents("outer.txt"); //$outer_array=explode("\n", $outer); //$content=clean_page($content); //$content=clean_page_bpro($content); $content=clean_page_am($content); print $content; //} ?>