getMessage(); } // HAMID API test $total++; $h=@file_get_contents("http://localhost:5821/hamid-api.php"); $tests["hamid"]=$h?"ok":"fail"; if($h)$ok++; // Brain Engine test $total++; $b=@file_get_contents("http://localhost:5890/api/brain-combo.php"); $tests["brain"]=$b?"ok":"fail"; if($b)$ok++; // Arsenal API test $total++; $a=@file_get_contents("http://localhost:5890/api/index.php"); $tests["arsenal"]=$a?"ok":"fail"; if($a)$ok++; echo json_encode(["status"=>"success","tests"=>$tests,"passed"=>$ok,"total"=>$total,"score"=>round($ok/$total*100)."%"]);