function get_png() { $tmp_filename = tempnam('/tmp', 'php-curl-class.'); file_put_contents($tmp_filename, $this->create_png()); return $tmp_filename; }