pass fpassthru contents to variable
<p>here's a portion of my code (taken from google charts example here <a href="http://code.google.com/apis/chart/image/docs/post_requests.html" rel="nofollow">http://code.google.com/apis/chart/image/docs/post_requests.html</a>) that will display an image chart:</p>

<pre><code> $context = stream_context_create(
array('http' =&gt; array(
  'method' =&gt; 'POST',
  'content' =&gt; http_build_query($chart))));
fpassthru(fopen($url, 'r', false, $context));
</code></pre>

<p>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</p>

<pre><code>$image = fpassthru(fopen($url, 'r', false, $context));
</code></pre>

<p>any idea? thanks</p>
