Recently moved servers and allow_url_fopen is turned off for security reasons so need to try and update some old scripts.
How can I use cURL for the following?
// Send the request, and print out the returned bytes.
$url = 'http://chart.apis.google.com/chart?chid=' . md5(uniqid(rand(), true));
$context = stream_context_create(
array(
'http' => array(
'method' => 'POST',
'content' => http_build_query($chart),
'header' => "Content-Type: application/x-www-form-
urlencoded\r\n"
)
)
);
//Set Headers
header("Cache-Control: no-cache");
header('content-type: image/png');
fpassthru(fopen($url, 'r', false, $context));