title: PHP - How to check no extension downloadable URL
body: <pre><code>        $url=download.piriform.com/ccsetup524.exe
  
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL,$url);
          // don't download content
          curl_setopt($ch, CURLOPT_NOBODY, 1);
          curl_setopt($ch, CURLOPT_FAILONERROR, 1);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
          if(curl_exec($ch) !== FALSE)
          {
              return true;
          }
          else
          {
              return false;
          }
  </code></pre>
  
  <p>This works fine - it returns <em>true</em> (that means the link is downloadable).</p>
  
  <p>But when the url has no extension like</p>
  
  <pre><code>$url=https://drive.google.com/open?id=0B5a6JxhqgyoIdGFVeXFKSGZsd0E
  </code></pre>
  
  <p>it is not working.
  It always returns <em>false</em> (that means the link is not downloadable). </p>