![]() 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/gocodeme.com/public_html/BACKUP/ |
<?php
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html>
<head>
<title>MusicStudio Pro - Song Creation Test</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background: #0a0a0a;
color: white;
}
.success { color: #48bb78; }
.error { color: #f56565; }
.warning { color: #ed8936; }
.info { color: #4299e1; }
pre {
background: #1a1a1a;
padding: 15px;
border-radius: 8px;
border: 1px solid #333;
color: #e2e8f0;
}
.test-section {
border: 1px solid #333;
padding: 20px;
margin: 20px 0;
border-radius: 8px;
background: #1a1a1a;
}
.btn {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
padding: 12px 24px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
margin: 10px 5px;
}
.btn:hover {
transform: translateY(-2px);
}
.audio-player {
margin: 20px 0;
padding: 20px;
background: #2d2d2d;
border-radius: 12px;
}
.demo-note {
background: rgba(237, 137, 54, 0.1);
border: 1px solid #ed8936;
padding: 15px;
border-radius: 8px;
margin: 15px 0;
}
</style>
</head>
<body>
<h1>🎵 MusicStudio Pro - Song Creation Test</h1>
<div class="demo-note">
<h3>⚠️ Demo Mode</h3>
<p>Since the Suno API is temporarily unavailable, this test uses demo data to show how the music studio works. In production, this would generate real AI music based on your prompts.</p>
</div>
<div class="test-section">
<h2>🎼 Test Song Creation</h2>
<p>Let's create a song using the MusicStudio Pro API:</p>
<form id="testForm">
<label for="prompt">Song Description:</label><br>
<textarea id="prompt" rows="4" cols="50" style="background: #2d2d2d; color: white; border: 1px solid #333; padding: 10px; border-radius: 5px;">An upbeat electronic dance track with heavy bass, synthesizers, and a driving beat. Should be energetic and perfect for a workout playlist.</textarea><br><br>
<label for="duration">Duration (seconds):</label>
<input type="number" id="duration" value="30" min="10" max="600" style="background: #2d2d2d; color: white; border: 1px solid #333; padding: 8px; border-radius: 5px;"><br><br>
<button type="submit" class="btn">🎵 Create Song</button>
</form>
<div id="result" style="display: none;">
<h3>✅ Song Created Successfully!</h3>
<div id="songDetails"></div>
</div>
<div id="loading" style="display: none;">
<h3>🔄 Creating your song...</h3>
<p>This may take a few moments...</p>
</div>
</div>
<div class="test-section">
<h2>🔗 Quick Links</h2>
<a href="musicstudio.html" class="btn">🎵 Full MusicStudio Pro</a>
<a href="diagnostic.php" class="btn">🔧 Server Diagnostic</a>
<a href="test_suno_api.php" class="btn">🌐 API Status</a>
</div>
<script>
document.getElementById('testForm').addEventListener('submit', async function(e) {
e.preventDefault();
const prompt = document.getElementById('prompt').value;
const duration = document.getElementById('duration').value;
document.getElementById('loading').style.display = 'block';
document.getElementById('result').style.display = 'none';
try {
const response = await fetch('api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'music',
prompt: prompt,
model: 'v3',
duration: parseInt(duration)
})
});
const data = await response.json();
document.getElementById('loading').style.display = 'none';
if (data.success) {
const songDetails = document.getElementById('songDetails');
songDetails.innerHTML = `
<div class="audio-player">
<h4>🎵 ${data.data.title}</h4>
<p><strong>Duration:</strong> ${data.data.duration} seconds</p>
<p><strong>Prompt:</strong> ${data.data.prompt}</p>
<audio controls style="width: 100%; margin: 15px 0;">
<source src="${data.data.audio_url}" type="audio/wav">
Your browser does not support the audio element.
</audio>
<a href="${data.data.audio_url}" download class="btn">⬇️ Download Audio</a>
${data.data.demo ? '<p class="warning">⚠️ This is demo audio (Suno API unavailable)</p>' : ''}
</div>
`;
document.getElementById('result').style.display = 'block';
} else {
alert('Error: ' + data.error);
}
} catch (error) {
document.getElementById('loading').style.display = 'none';
alert('Error: ' + error.message);
}
});
</script>
</body>
</html>