20 lines
747 B
PHP
20 lines
747 B
PHP
<?php
|
|
// V47 L99 Status fallback (if original disparu) - derived from NonReg
|
|
header('Content-Type: application/json');
|
|
$nr = @json_decode(@file_get_contents('https://weval-consulting.com/api/nonreg-api.php?cat=all'), true);
|
|
$score = $nr['score'] ?? 0;
|
|
$pass = $nr['pass'] ?? 0;
|
|
$total = $nr['total'] ?? 0;
|
|
echo json_encode(array(
|
|
'ok' => true,
|
|
'v' => 'V47-l99-status-fallback-from-nr',
|
|
'ts' => date('c'),
|
|
'nr_pct' => $score,
|
|
'pass' => $pass,
|
|
'total' => $total,
|
|
'dpmo' => $score >= 100 ? 0 : intval((100-$score)*10000),
|
|
'sigma_estimated' => $score >= 100 ? '6sigma_ok' : ($score >= 99 ? '5sigma' : '4sigma'),
|
|
'failures' => $nr['fail_items'] ?? array(),
|
|
'derived' => 'from_nonreg_api',
|
|
), JSON_PRETTY_PRINT);
|