title: Store image in variable, echo later
body: <p>Let's say I have a user enter the URL of an image.</p>
  
  <p>After URL validation, etc. I want to get the image and store it in a PHP variable. Not the image path, but the actual image itself.</p>
  
  <p>I am adding this image-holding variable in between other strings, so I cannot change use <code>header()</code> before echoing the image. Is it possible to use <code>&lt;img&gt;</code> HTML tags? I really don't want to copy the images to my own server...</p>
  
  <p>How do I:</p>
  
  <ol>
  <li>Store the image in a variable such that,</li>
  <li>Echo the image from the variable without changing headers.</li>
  </ol>
  
  <h2>Edit:</h2>
  
  <p>I said above that I am putting this image inside another variable, e.g.:</p>
  
  <pre><code>$str = "blah blah" . $var_holding_img . "more text";
  </code></pre>
  
  <p>Is it possible to insert something in the string above that will be replaced with the images? Can parse the variable <code>$str</code> later to replace some random text like "abg30j-as" with the image...</p>