T.ME/BIBIL_0DAY
CasperSecurity


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/utils/test_api_box_status.php
<?php
// Comprehensive API.Box service status check
error_reporting(E_ALL);
ini_set('display_errors', 1);

$api_key = '63edba40620216c5aa2c04240ac41dbd';

echo "<h1>🔧 API.Box Service Status Check</h1>";

// Test 1: Basic API connectivity
echo "<h2>1. Basic API Connectivity</h2>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

echo "<p><strong>API Base URL:</strong> https://api.api.box</p>";
echo "<p><strong>HTTP Code:</strong> $http_code</p>";
echo "<p><strong>Error:</strong> " . ($error ?: 'None') . "</p>";

// Test 2: API Status endpoint
echo "<h2>2. API Status Endpoint</h2>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box/api/v1/status');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

echo "<p><strong>Status Endpoint:</strong> https://api.api.box/api/v1/status</p>";
echo "<p><strong>HTTP Code:</strong> $http_code</p>";
echo "<p><strong>Response:</strong></p>";
echo "<pre style='background: #f0f0f0; padding: 10px; max-height: 200px; overflow-y: auto;'>";
echo htmlspecialchars($response);
echo "</pre>";

// Test 3: Try different status endpoint format
echo "<h2>3. Alternative Status Endpoints</h2>";

$endpoints = [
    'https://api.api.box/api/v1/task/6490c73e789c4943b8ebb5c9b1e71434',
    'https://api.api.box/api/v1/tasks/6490c73e789c4943b8ebb5c9b1e71434',
    'https://api.api.box/api/v1/generate/status/6490c73e789c4943b8ebb5c9b1e71434',
    'https://api.api.box/api/v1/music/status/6490c73e789c4943b8ebb5c9b1e71434'
];

foreach ($endpoints as $endpoint) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $endpoint);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Authorization: Bearer ' . $api_key,
        'Content-Type: application/json'
    ]);
    
    $response = curl_exec($ch);
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    
    echo "<p><strong>$endpoint</strong> - HTTP $http_code</p>";
    if ($http_code === 200) {
        echo "<p style='color: green;'>✅ This endpoint works!</p>";
        echo "<pre style='background: #f0f0f0; padding: 10px; max-height: 100px; overflow-y: auto;'>";
        echo htmlspecialchars($response);
        echo "</pre>";
    }
}

// Test 4: Try to create a new test task
echo "<h2>4. Test New Task Creation</h2>";
$test_data = [
    'prompt' => 'A short test melody for API verification',
    'model' => 'V3_5',
    'style' => 'Pop',
    'title' => 'API Test Track',
    'customMode' => true,
    'instrumental' => false,
    'duration' => 15,
    'callBackUrl' => 'https://soundstudiopro.com/callback.php'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box/api/v1/generate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($test_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key,
    'Content-Type: application/json',
    'User-Agent: MusicStudio-Pro/1.0'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

echo "<p><strong>Generate Endpoint:</strong> https://api.api.box/api/v1/generate</p>";
echo "<p><strong>HTTP Code:</strong> $http_code</p>";
if ($error) {
    echo "<p style='color: red;'><strong>cURL Error:</strong> $error</p>";
}
echo "<p><strong>Response:</strong></p>";
echo "<pre style='background: #f0f0f0; padding: 10px; max-height: 200px; overflow-y: auto;'>";
echo htmlspecialchars($response);
echo "</pre>";

// Test 5: Check API documentation or info
echo "<h2>5. API Information</h2>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.api.box/api/v1/info');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "<p><strong>Info Endpoint:</strong> https://api.api.box/api/v1/info</p>";
echo "<p><strong>HTTP Code:</strong> $http_code</p>";
echo "<p><strong>Response:</strong></p>";
echo "<pre style='background: #f0f0f0; padding: 10px; max-height: 200px; overflow-y: auto;'>";
echo htmlspecialchars($response);
echo "</pre>";

// Summary and recommendations
echo "<h2>📋 Summary & Recommendations</h2>";

if ($http_code === 200) {
    echo "<p style='color: green;'>✅ API.Box service is accessible</p>";
    echo "<p><strong>Next Steps:</strong></p>";
    echo "<ol>";
    echo "<li>Check if the task ID format is correct</li>";
    echo "<li>Verify the API key has proper permissions</li>";
    echo "<li>Try creating a new task to test the workflow</li>";
    echo "<li>Check API.Box documentation for correct endpoints</li>";
    echo "</ol>";
} else {
    echo "<p style='color: red;'>❌ API.Box service may be down or API key is invalid</p>";
    echo "<p><strong>Immediate Actions:</strong></p>";
    echo "<ol>";
    echo "<li>Verify API key is still valid</li>";
    echo "<li>Check API.Box service status</li>";
    echo "<li>Contact API.Box support</li>";
    echo "<li>Consider using a different music generation service</li>";
    echo "</ol>";
}

echo "<h3>🔗 Quick Actions</h3>";
echo "<p><a href='/create_music.php' style='color: #667eea;'>🎵 Try Creating New Music</a> | ";
echo "<a href='/library.php' style='color: #667eea;'>📚 View Library</a> | ";
echo "<a href='/dashboard.php' style='color: #667eea;'>📊 Dashboard</a></p>";
?> 

CasperSecurity Mini