Hat das denn schon jemand ausprobiert?
<?php
$user = '12345678';
$password = 'secret';
$url = 'https://192.168.1.200/cgi-bin/hanservice.cgi';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($ch, CURLOPT_USERPWD, "$user:$password");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$cookie = curl_getinfo($ch, CURLINFO_COOKIELIST);
curl_close($ch);
preg_match('/<input.*?value="(.*?)"/', $response, $matches);
$token = $matches[1];
$action = 'meterform';
$post_data = "tkn=$token&action=$action";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_COOKIE, implode('; ', $cookie));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
preg_match('/<select.*?id="meterform_select_meter".*?<option.*?value="(.*?)"/', $response, $matches);
$meter_id = $matches[1];
$post_data = "tkn=$token&action=showMeterProfile&mid=$meter_id";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_COOKIE, implode('; ', $cookie));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
preg_match('/<table.*?id="metervalue".*?<td.*?id="table_metervalues_col_wert".*?>(.*?)<\/td>.*?<td.*?id="table_metervalues_col_einheit".*?>(.*?)<\/td>.*?<td.*?id="table_metervalues_col_timestamp".*?>(.*?)<\/td>.*?<td.*?id="table_metervalues_col_istvalide".*?>(.*?)<\/td>.*?<td.*?id="table_metervalues_col_name".*?>(.*?)<\/td>.*?<td.*?id="table_metervalues_col_obis".*?>(.*?)<\/td>/s', $response, $matches);
$result_data = [
'value' => $matches[1],
'unit' => $matches[2],
'timestamp' => $matches[3],
'isvalid' => $matches[4],
'name' => $matches[5],
'obis' => $matches[6]
];
echo $result_data['timestamp'] . " " . $result_data['value'] . " " . $result_data['unit'];
?>