Files
html/api/ambre-tools-check.php
2026-04-22 00:10:04 +02:00

32 lines
1.2 KiB
PHP

<?php
header("Content-Type: application/json");
$out = [];
// Check AMBRE-V6-TOOLS presence live
$wevia = file_get_contents("/var/www/html/wevia.html");
$out["v6_tools_present"] = substr_count($wevia, "AMBRE-V6-TOOLS");
$out["ambre_tool_image"] = substr_count($wevia, "ambre-tool-image");
$out["ambre_tool_search"] = substr_count($wevia, "ambre-tool-web-search");
$out["ambre_tool_calc"] = substr_count($wevia, "ambre-tool-calc");
$out["ambre_tool_url"] = substr_count($wevia, "ambre-tool-url-summary");
// Existing tool endpoints
$out["tool_endpoints"] = [];
foreach (glob("/var/www/html/api/ambre-tool-*.php") as $f) {
$out["tool_endpoints"][] = [
"name" => basename($f),
"kb" => round(filesize($f)/1024, 1),
];
}
// Toolfk existing integration
$out["toolfk_refs"] = [];
foreach (glob("/var/www/html/api/*toolfk*.php") as $f) $out["toolfk_refs"][] = basename($f);
foreach (glob("/var/www/html/*toolfk*.html") as $f) $out["toolfk_refs"][] = basename($f);
// Qwen existing
$out["qwen_refs"] = [];
foreach (glob("/var/www/html/api/*qwen*.php") as $f) $out["qwen_refs"][] = basename($f);
echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);