title: Detecting SSL With PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1175096/how-to-find-out-if-you-are-using-https-without-serverhttps">How To Find Out If You are Using HTTPS Without $_SERVER[&#39;HTTPS&#39;]</a>  </p>
  </blockquote>
  
  
  
  <p>I went looking around the web for ways to detect if a server is using an HTTPS connection, but no one site seemed to have all the answers (and some different ones).  What exactly are all the ways to detect if a server is using an HTTPS connection with PHP?  I need to know several ways to detect SSL as some of my scripts are redistributed and various servers handle things differently.</p>