title: Get a Javascript variable in PHP
body: <p>I have a simple javascript code, that tells me if my website is in iframe.</p>
  
  <pre><code>&lt;script&gt;
  if ( window.self === window.top ) { 
      var iframe = '0';
  } else { 
      var iframe = '1';
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>How can I get the "iframe" variable from javascript, in php?</p>
  
  <p>I want to do something like this:</p>
  
  <pre><code>&lt;?php if ($iframe == "0") {
   //mysite for iframe
  } else {
   //mysite general
  }
  ?&gt;
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>PS.: I want to be SEO, too.</p>
  
  <p>Thank you so much!!!</p>