title: How to get content type of a web address?
body: <p>I want to get type of a web address. For example <a href="http://feed.2barnamenevis.com/2barnamenevis" rel="noreferrer">this</a> is a Html page and its page type is <code>text/html</code> but the type of <a href="http://feed.2barnamenevis.com/2barnamenevis?format=xml" rel="noreferrer">this </a>is <code>text/xml</code>. <a href="http://bayanbox.ir/user/ahmadalli/images/div.png" rel="noreferrer">this</a> page's type seems to be <code>image/png</code> but it's <code>text/html</code>. </p>
  
  <p><strong>I want to know how can I detect the content type of a web address like <a href="http://bayanbox.ir/user/ahmadalli/images/div.png" rel="noreferrer">this</a>?</strong></p>