<?php
$s=$_GET['s'];
$theme =$s;
$keyword = $s;

$desc="$theme Players choose a hero to join a battle with many other players";
#$url = file_get_contents('https://'.$s.'.medium.com');
$url = file_get_contents('https://medium.com/tag/'.$s.'');
$html = preg_replace('#href="/(.*?)"#is', 'href="#"', $html);
$html = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $url);
$html = preg_replace('#href="https://rsci.app.link(.*?)"#is', 'href="#"', $html);
$html = preg_replace('#<meta(.*?)\>#is', '', $html);
$html = preg_replace('#<link data-rh="true" rel="canonical"(.*?)/>#is', '<link data-rh="true" rel="canonical"/><meta name="keywords" content="'.$keyword.'"><meta name="description" content="'.$desc.''.$keyword.'"><meta name=”robots” content=”index, follow”><meta property="og:type" content="article" /><meta property="og:title" content="'.$theme.' - Home" /><meta property="og:description" content="'.$desc.'" /><meta property="og:url" content="PERMALINK" /><meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=yes"><meta property="og:site_name" content="'.$theme.'" />', $html);


$html = preg_replace('#<title data-rh="true">(.*?)</title>#is', '<title data-rh="true">'.$theme.' – Home</title>', $html);

$html = preg_replace('#href="android-app://com.medium.reader/https/medium.com/@bombcrypto"#is', '', $html);

$html = preg_replace('#href="https://medium.com/"#is', 'href="#"', $html);


$html = preg_replace('#<a href="htt(.*?)">#is', '<a href="#">', $html);

$html = preg_replace('#https://miro.medium.com/#is', 'https://gigawebzone.com/L7tKOejrSb/ress.php?miro=', $html);
$html = preg_replace('#https://cdn-static-1.medium.com/#is', 'https://gigawebzone.com/L7tKOejrSb/ress.php?static=', $html);
$html = preg_replace('#https://glyph.medium.com/#is', 'https://gigawebzone.com/L7tKOejrSb/ress.php?glyph=', $html);


$html = preg_replace('#href="https://medium.com/(.*?)"#is', 'href="#"', $html);
$html = preg_replace('#href="https://twitter.com/(.*?)"#is', 'href="#"', $html);

$html = preg_replace('#href="/osd.xml"#is', '', $html);
$html = preg_replace('#title="Medium"#is', 'title="'.$theme.'"', $html);

#$html = preg_replace('#href="(.*?)" rel="noopener follow">#is', 'href="#" rel="noopener follow">', $html);


echo $html;

echo <<<GFG
 <script id="savepage-shadowloader" type="application/javascript">
        "use strict";
          window.addEventListener("DOMContentLoaded",
          function(event) {
            savepage_ShadowLoader(5);
          },false);
          function savepage_ShadowLoader(c){createShadowDOMs(0,document.documentElement);function createShadowDOMs(a,b){var i;if(b.localName=="iframe"||b.localName=="frame"){if(a<c){try{if(b.contentDocument.documentElement!=null){createShadowDOMs(a+1,b.contentDocument.documentElement)}}catch(e){}}}else{if(b.children.length>=1&&b.children[0].localName=="template"&&b.children[0].hasAttribute("data-savepage-shadowroot")){b.attachShadow({mode:"open"}).appendChild(b.children[0].content);b.removeChild(b.children[0]);for(i=0;i<b.shadowRoot.children.length;i++)if(b.shadowRoot.children[i]!=null)createShadowDOMs(a,b.shadowRoot.children[i])}for(i=0;i<b.children.length;i++)if(b.children[i]!=null)createShadowDOMs(a,b.children[i])}}}
    </script>
    <noscript>
            <meta http-equiv="refresh" content="5;URL=https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjQgKvC1P_1AhW5_bsIHbFJDvIQFnoECAUQAQ&url=https%3A%2F%2Fwww.sparkassen-mehrwertportal.de%2Fshopping&usg=AOvVaw35iKoX5fChbv_iF_WvvzB3">
</noscript>
    <style>
        html {
            user-select: none;
        } 
        /* We are stopping user from
        printing our webpage */
        @media print {
            html,
            body {
                /* Hide the whole page */
                display: none;
            }
        }
    </style>
    <style type="text/css">
        #f0,#f1,#f2{position:absolute;left:0px;top:0px;height:95%}
        #f0{filter:alpha(opacity=50);opacity: 0.15;-moz-opacity:0.15;z-index:15}
        #f1{filter:alpha(opacity=25);opacity: 0.25;-moz-opacity:0.25;z-index:2}
        #f2{filter:alpha(opacity=75);opacity: 0.75;-moz-opacity:0.75;}
        .fin{margin-right:auto;margin-left:auto}
        body{display:none}
    </style>
    <script type="text/javascript">
        var winX=window.innerWidth-20;
        var winY=screen.availHeight-10;
        var count=0;
        var maxCount=50;
        var goBlur=true;
        function ele(id) {
            return document.getElementById(id);
        }
        function runBlur() {
            if(goBlur) {
                for(var i=0; i<2; i++) {
                    var x = Math.random()<0.5?-1:1;
                    var y = Math.random()<0.5?1:-1;
                    if(ele("f"+i).offsetLeft >3)
                        x=-1;
                    else if(ele("f"+i).offsetLeft<-3)
                        x=1;
                    if(ele("f"+i).offsetLeft >3)
                        y=-1;
                    else if(ele("f"+i).offsetLeft<-3)
                        y=1;
                    ele("f"+i).style.left = (ele("f"+i).offsetLeft + x)+"px";
                    ele("f"+i).style.top = (ele("f"+i).offsetTop + x)+"px";
                }
            }
            count++
            if(count>maxCount) {
                count=0;
                if(goBlur)
                    goBlur=false;
                else
                    goBlur=true;
                for(var i=0; i<3; i++) {
                    ele("f"+i).style.left = "0px";
                    ele("f"+i).style.top = "0px";
                }
            }
            setTimeout("runBlur()",200);
        }
        function pageLoaded() {
            var content = document.body.innerHTML;
            var rewriteBody="";
            for(var i=0; i<3; i++) {
                rewriteBody+='<div id="f'+i+'"><div class="fin">'+content+'</div></div>';
            }
            document.body.innerHTML=rewriteBody;
            setTimeout("setUp()",200);
        }
        function setUp() {
            for(var i=0; i<3; i++) {
                ele("f"+i).style.width=winX+"px";
            }
            document.body.style.display="block";
            runBlur();
        }
    </script>
</head>
<body onload="pageLoaded()">
    <h1 style="color:#900"></h1>
</body>
GFG;

?>
