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/.cursor-server/data/User/History/3171eca0/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/.cursor-server/data/User/History/3171eca0/XNWW.php
<?php
require_once 'config/database.php';

$pdo = getDBConnection();

echo "<h2>Regenerating 'Happy Song For Andrew' Track</h2>";

// Find the track with temporary task ID
$stmt = $pdo->prepare("
    SELECT * FROM music_tracks 
    WHERE title = 'Happy Song For Andrew' AND task_id LIKE 'temp_%'
    ORDER BY created_at DESC
");

$stmt->execute();
$track = $stmt->fetch();

if (!$track) {
    echo "<p style='color: red;'>❌ Track not found or already has proper task ID</p>";
    exit;
}

echo "<h3>Found Track: " . htmlspecialchars($track['title']) . " (ID: " . $track['id'] . ")</h3>";
echo "<p>Current Task ID: " . $track['task_id'] . "</p>";
echo "<p>Prompt: " . htmlspecialchars($track['prompt']) . "</p>";
echo "<p>Model: " . $track['model_version'] . "</p>";

// API.Box configuration with correct endpoint and format
$api_key = '63edba40620216c5aa2c04240ac41dbd';
$api_url = 'https://api.api.box/api/v1/generate';

// Prepare the request data in the correct format
$request_data = [
    'prompt' => $track['prompt'],
    'model' => 'V3_5',
    'style' => 'Pop',
    'title' => $track['title'],
    'customMode' => false,
    'instrumental' => false,
    'callBackUrl' => 'https://soundstudiopro.com/callback.php'
];

echo "<p>Submitting to API.Box...</p>";
echo "<p>Request Data: " . json_encode($request_data, JSON_PRETTY_PRINT) . "</p>";

// Make the API request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $api_key,
    'Content-Type: application/json',
    'User-Agent: SoundStudioPro-Music/2.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);
$curl_error = curl_error($ch);
curl_close($ch);

echo "<p>API Response Code: $http_code</p>";
echo "<p>API Response: " . htmlspecialchars($response) . "</p>";

if ($curl_error) {
    echo "<p style='color: red;'>❌ cURL Error: " . htmlspecialchars($curl_error) . "</p>";
}

if ($http_code === 200) {
    $response_data = json_decode($response, true);
    
    if ($response_data && isset($response_data['data']['task_id'])) {
        $new_task_id = $response_data['data']['task_id'];
        
        echo "<p style='color: green;'>✅ Success! New Task ID: $new_task_id</p>";
        
        // Update the track with the new task ID
        $stmt = $pdo->prepare("
            UPDATE music_tracks 
            SET task_id = ?, status = 'processing', updated_at = CURRENT_TIMESTAMP 
            WHERE id = ?
        ");
        
        if ($stmt->execute([$new_task_id, $track['id']])) {
            echo "<p style='color: green;'>✅ Track updated with new Task ID!</p>";
            echo "<p>Track ID: " . $track['id'] . "</p>";
            echo "<p>New Task ID: $new_task_id</p>";
            echo "<p>Status: processing</p>";
        } else {
            echo "<p style='color: red;'>❌ Failed to update track in database</p>";
        }
    } else {
        echo "<p style='color: red;'>❌ Invalid response format</p>";
        echo "<p>Expected 'data.task_id' but got: " . json_encode($response_data) . "</p>";
    }
} else {
    echo "<p style='color: red;'>❌ API request failed with HTTP $http_code</p>";
}

echo "<h3>✅ Regeneration Complete!</h3>";
echo "<p>The track is now being processed by API.Box with a proper task ID.</p>";
echo "<p>Check back in a few minutes - it should complete automatically!</p>";
?> 

CasperSecurity Mini