title: how to check if a https site exists in php
body: <p>I m using codes like </p>
  
  <pre><code>&lt;?php
   $url = 'http://www.example.com';
   if(isset($_GET['url'])){$url = $_GET['url'];}
   $array = get_headers($url);
   $string = $array[0];
   if(strpos($string,"200")){
       echo 'url exists';
   }
   else{
       echo 'url does not exist';
   }
   //this code does not works for ssl connection
   ?&gt;
  </code></pre>
  
  <p>to check if a url exists but it is not working for sites which are using ssl conection, i mean <a href="https://www.example.com" rel="nofollow">https://www.example.com</a> type sites</p>