Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$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('http://highcharts.some.host:11942/', 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.