I’m calling my php script that generates the google chart (POST method http://code.google.com/apis/chart/docs/post_requests.html) and has this code to output the image (the page is set to png output):
$context = stream_context_create(
array(‘http’ => array(
‘method’ => ‘POST’,
‘content’ => http_build_query($chart))));
fpassthru(fopen($url, ‘r’, false, $context));
I call the script as an image (…img src="gchart.php?..)
All works fine, but i’d like to cache the results of the above, how can i capture the output of post request and store as png file?