title: PHP Image content type problem
body: <p>I have a specific problem, and cant get over it.</p>
  
  <p>For my latest project I need a simple PHP script that display an image according to its ID sent through URL. Here's the code:</p>
  
  <pre><code>header("Content-type: image/jpeg");
  $img = $_GET["img"];
  echo  file_get_contents("http://www.somesite.hr/images/$img");
  </code></pre>
  
  <p>The problem is that the image doesn't show although the browser recognizes it (i can see it in the page title), instead I get the image URL printed out.</p>
  
  <p>It doesn't work neither on a server with remote access allowed nor with one without.
  Also, nothing is printed or echoed before the header.</p>
  
  <p>I wonder if it is a content type error, or something else. 
  Thanks in advance.</p>