here's a portion of my code (taken from google charts example here http://code.google.com/apis/chart/image/docs/post_requests.html) that will display an image chart:
$context = stream_context_create(
array('http' => array(
'method' => 'POST',
'content' => http_build_query($chart))));
fpassthru(fopen($url, 'r', false, $context));
The problem is instead of displaying the image directly, I'd like to pass the contents of fpassthru (which essentially is the image) to a variable.. perhaps something like
$image = fpassthru(fopen($url, 'r', false, $context));
any idea? thanks