![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/private_html/utils/ |
<?php
// Test different API endpoints to find the correct status check
$api_key = '63edba40620216c5aa2c04240ac41dbd';
$task_id = '9493779915602495dc510bb23ae2eab2'; // From previous test
echo "<h2>Testing API.Box Endpoints</h2>";
$endpoints_to_test = [
"/api/v1/status/$task_id",
"/api/v1/task/$task_id",
"/api/v1/tasks/$task_id",
"/api/v1/generate/status/$task_id",
"/api/v1/result/$task_id",
"/api/v1/task/status/$task_id"
];
foreach ($endpoints_to_test as $endpoint) {
echo "<h3>Testing: $endpoint</h3>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box' . $endpoint);
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $api_key,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "<p>HTTP Code: $http_code</p>";
echo "<p>Response: " . htmlspecialchars($response) . "</p>";
if ($http_code === 200) {
echo "<p style='color: green;'>✅ Endpoint works!</p>";
} else {
echo "<p style='color: red;'>❌ Endpoint failed</p>";
}
echo "<hr>";
}
// Test if there's a general tasks list endpoint
echo "<h3>Testing General Tasks Endpoint</h3>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box/api/v1/tasks');
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $api_key,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "<p>HTTP Code: $http_code</p>";
echo "<p>Response: " . htmlspecialchars($response) . "</p>";
if ($http_code === 200) {
echo "<p style='color: green;'>✅ Tasks endpoint works!</p>";
} else {
echo "<p style='color: red;'>❌ Tasks endpoint failed</p>";
}
echo "<h3>Test Complete</h3>";
?>