title: PHP - Get raw image data from image in a HTML document
body: <p>How do i properly grab an image that is displayed in a HTML document and feed it to PHP to be read as image binary. I do not have direct access to the image file. The image i am trying to grab is fed to the client with HTML via PHP and printed in HTML format and using an <code>&lt;img&gt;</code> tag to display the image. The src is just a link to the same page i am currently on. The link is a GET request.</p>
  
  <p>The link looks like this:</p>
  
  <pre><code>GETIMAGE.php?type=small&amp;path=/path/to/image.png
  </code></pre>
  
  <p>This does not return the actual image with image MIME types. But rather a HTML displaying the image.</p>
  
  <p>I do not have access to the source code in GETIMAGE.php file. This is encrypted as i am using a portal solution that is licensed.</p>
  
  <p>This is the source that is returned from the GETIMAGE.php script:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;title&gt;GETIMAGE.php (80×112)&lt;/title&gt;
      &lt;style type="text/css"&gt;&lt;/style&gt;
  &lt;/head&gt;
  &lt;body style="margin: 0px;"&gt;
      &lt;img style="-webkit-user-select: none" src="http://portal.craftnordic.com/PORTAL/GETIMAGE.php?type=small&amp;amp;path=Path/To/Image.png"&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>