Write image back to browser

Want to send an image from php to browser?  You can use code like this

< ?php
header('Content-type: image/jpg');
readfile('your.jpg');
?>

 

For using with htmlsnapshot, the code is like this

 < ?php

$snap = new COM("HTMLSNAP2.HtmlSnap.1");
header('Content-type: image/jpg');

$snap->SnapUrl(www.google.com, “*”)
print $snap->GetImageBytes(“*.jpg”)
?>