title: Any replacement for get_header in php?
body: <p>I am creating a function which crawls links from a page. 
  Now there can be different ways of specifying links in href tag..</p>
  
  <p>1) <a href="http://example.com" rel="nofollow">http://example.com</a></p>
  
  <p>2) <a href="http://www.example.com" rel="nofollow">http://www.example.com</a></p>
  
  <p>3) example.com</p>
  
  <p>4) files/downloads</p>
  
  <p>5) www.example.com</p>
  
  <p>Now here the 1), 2) and 5) are in proper format. 
  But before adding 3) and 4) i want to make them in proper url format...</p>
  
  <p>which means 3) should become <a href="http://example.com" rel="nofollow">http://example.com</a> and 4) should become </p>
  
  <p>http:// THECURRENTPAGEURLDOMAIN /files/download</p>
  
  <p>I am using get_headers to differentiate between a relative and independent URL. So if i test headers for example.com by appending http:// in front, it would return some headers and</p>
  
  <p>if i test headers for files/download by same method , it would return failed to open stream instead of some false value which i can use to know that its a relative url. </p>
  
  <p>So why get_headers isnt returning false value. It is giving warning about failed to open stream.</p>