I have:
echo"
<div id=IwantToSaveThisWholeDivAsAnImage)>
  <div id=OneOfMultipleDivs>
    <table>multiple tables rendered here
    </table>
  </div>
</div>";
I have tried (one of many):
$html_code = " 
<html> 
  <head> 
   <title>Image</title> 
   <style> 
     body { 
     font-family:verdana; 
     font-size:11px; 
     color:black 
   } 
   </style> 
  </head> 
  <body> 
   my tables here
  </body> 
</html>";
$img = imagecreate("300", "600"); 
$c = imagecolorallocate($img, 0, 0, 0);
$c2 = imagecolorallocate($img, 255, 255, 255);
imageline($img,0,0,300,600,$c);
imageline($img,300,0,0,600,$c2);
$white = imagecolorallocate($img, 255, 255, 255); 
imagettftext($img, 9, 0, 1, 1, $white, "arial.tff", '$html_code'); 
header("Content-type: image/jpeg");
imagejpeg($img);
I'm not allowed to use outside libaries. Read that it can be done with GD, but I have been unsuccessful thus far. Any ideas and help would be greatly appreciated! UB
 
     
     
    