Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$postData = array(); // Fill this with your JSON/JS
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-Type: application/json'. "\r\n",
'content' => json_encode($postData)
$chart = file_get_contents('', false, $context);
file_put_contents(__DIR__ . '/output/chart.png', $chart);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.