Hi Jon,

I now see the rendered Grap in the output png file. If I try to view directly a message appears

I checked for echos, prints etc, but it is all clear. The cURL is working properly and shows the correct results in the stored graph.
I listed the complete code below. Very strange
<?php // content="text/plain; charset=utf-8"
include("include/inc_session.php");
# payload für SQL
#$data = json_encode($postdata);
$auth = base64_encode($cred);
$hdrs = array(
'Authorization: Basic '.$auth,
'Content-Type: application/json',
'Accept: application/json'
);
# erzeuge einen neuen cURL-Handle
$ch = curl_init();
# setze die URL und andere Optionen
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_URL, "http://xxxxxx:yyy/services/RACF_AUDIT/count_user/v1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $hdrs);
# führe die Aktion aus und gib die Daten an den Browser weiter
$erg=curl_exec($ch);
$json=json_decode($erg,true);
$datax=array_column($json['ResultSet Output'], 'C1');
$datay=array_column($json['ResultSet Output'], 'ANZAHL');
# schließe den cURL-Handle und gib die Systemresourcen frei
curl_close($ch);
require_once ('jpgraph/src/jpgraph.php');
require_once ('jpgraph/src/jpgraph_bar.php');
# Create the graph. These two calls are always required
$graph = new Graph(1000,600);
$graph->SetScale('textlin');
# Add a drop shadow
$graph->SetShadow();
# Adjust the margin a bit to make more room for titles
$graph->SetMargin(40,30,20,40);
# Create a bar pot
$bplot = new BarPlot($datay);
# Adjust fill color
$bplot->SetFillColor('orange');
$graph->Add($bplot);
# Setup the titles
$graph->title->Set('Anzahl UIDs nach 1.Buchstaben ');
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->title->Set('UID-Präfix');
$graph->yaxis->title->Set('');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
# Display the graph
$graph->Stroke();
?>
But thanks anyway, it was a big step