
 Jaroslav - 2012-01-04 10:59:53
 
Hi,
your class saves tempfile with constant name on disc.
This can be a problem for dynamic displayed data and multi access.
Please try new code:
private function GetBase64Image()
{
  $tempfile = str_replace (' ', '_', microtime());
  $this->SaveToFile($tempfile);
  $imgbinary = fread(fopen($tempfile, "r"), filesize($tempfile));
  @unlink ($tempfile);
  return base64_encode($imgbinary);
}