title: Get Content-Type of requested url in php
body: <p>Using php how would I be able to define the variable <code>$type</code> into the <code>content-type</code> of <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
  
  <p>For example: <code>$type</code> defined as <code>"text/html"</code></p>
  
  <p>So far this is what i am working with:</p>
  
  <pre><code>&lt;?php
  $url = 'http://www.example.com';
  print_r(get_headers($url));
  print_r(get_headers($url, 1));
  ?&gt;
  </code></pre>
  
  <p>The code may be changed as much as needed</p>