![]() 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');
// Configuration
$correctCallbackUrl = 'https://gocodeme.com/callback.php';
$wrongCallbackUrl = 'https://soundstudiopro.com/callback.php';
$brokenAudioUrl = 'https://soundstudiopro.com/audiofiles.php?id=8cd1c23483097cc26fac73049ea0302d';
$workingAudioUrl = 'https://www.soundjay.com/misc/sounds/bell-ringing-05.wav';
// Function to test callback endpoint
function testCallbackEndpoint($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
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);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);
return [
'http_code' => $httpCode,
'error' => $error,
'accessible' => $httpCode >= 200 && $httpCode < 400
];
}
// Test both callback URLs
$correctCallbackTest = testCallbackEndpoint($correctCallbackUrl);
$wrongCallbackTest = testCallbackEndpoint($wrongCallbackUrl);
?>
<!DOCTYPE html>
<html>
<head>
<title>Callback URL Fix - MusicStudio Pro</title>
<style>
body {
font-family: 'Inter', Arial, sans-serif;
margin: 0;
background: #0a0a0a;
color: white;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.header {
text-align: center;
margin-bottom: 40px;
padding: 40px 0;
background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
border-radius: 20px;
}
.success { color: #48bb78; }
.error { color: #f56565; }
.warning { color: #ed8936; }
.info { color: #4299e1; }
.fix-section {
border: 1px solid #333;
padding: 30px;
margin: 30px 0;
border-radius: 15px;
background: #1a1a1a;
}
.btn {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
padding: 15px 30px;
border: none;
border-radius: 10px;
cursor: pointer;
font-size: 16px;
margin: 10px 5px;
text-decoration: none;
display: inline-block;
transition: all 0.3s ease;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}
.btn-success {
background: linear-gradient(135deg, #48bb78, #38a169);
}
.btn-warning {
background: linear-gradient(135deg, #ed8936, #dd6b20);
}
pre {
background: #2d2d2d;
padding: 15px;
border-radius: 8px;
border: 1px solid #444;
color: #e2e8f0;
overflow-x: auto;
}
.test-result {
margin: 15px 0;
padding: 15px;
border-radius: 8px;
border-left: 4px solid;
}
.test-result.success { background: rgba(72, 187, 120, 0.1); border-color: #48bb78; }
.test-result.error { background: rgba(245, 101, 101, 0.1); border-color: #f56565; }
.test-result.warning { background: rgba(237, 137, 54, 0.1); border-color: #ed8936; }
.test-result.info { background: rgba(66, 153, 225, 0.1); border-color: #4299e1; }
.json-display {
background: #2d2d2d;
padding: 15px;
border-radius: 8px;
border: 1px solid #444;
margin: 10px 0;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🔧 Callback URL Fix</h1>
<p>Fix the callback URL issue causing broken audio</p>
</div>
<div class="fix-section">
<h2>🔍 Problem Analysis</h2>
<div class="test-result error">
<h4>Issue Identified:</h4>
<p>Your audio generation request is using the wrong callback URL:</p>
<div class="json-display">
<strong>Current Request:</strong><br>
<pre>{
"callBackUrl": "https://soundstudiopro.com/callback.php",
"customMode": true,
"instrumental": false,
"model": "V3_5",
"prompt": "a happy song about andrew",
"style": "Pop",
"title": "Generated Track"
}</pre>
</div>
<p><strong>Problem:</strong> The callback URL points to <code>soundstudiopro.com</code> instead of your domain <code>gocodeme.com</code></p>
</div>
</div>
<div class="fix-section">
<h2>📡 Callback URL Status</h2>
<div class="test-result <?php echo $correctCallbackTest['accessible'] ? 'success' : 'error'; ?>">
<h4>✅ Correct Callback URL: <?php echo htmlspecialchars($correctCallbackUrl); ?></h4>
<p><strong>Status:</strong> HTTP <?php echo $correctCallbackTest['http_code']; ?></p>
<p><strong>Accessible:</strong> <?php echo $correctCallbackTest['accessible'] ? 'Yes' : 'No'; ?></p>
<?php if ($correctCallbackTest['error']): ?>
<p><strong>Error:</strong> <?php echo htmlspecialchars($correctCallbackTest['error']); ?></p>
<?php endif; ?>
</div>
<div class="test-result <?php echo $wrongCallbackTest['accessible'] ? 'warning' : 'error'; ?>">
<h4>❌ Wrong Callback URL: <?php echo htmlspecialchars($wrongCallbackUrl); ?></h4>
<p><strong>Status:</strong> HTTP <?php echo $wrongCallbackTest['http_code']; ?></p>
<p><strong>Accessible:</strong> <?php echo $wrongCallbackTest['accessible'] ? 'Yes' : 'No'; ?></p>
<?php if ($wrongCallbackTest['error']): ?>
<p><strong>Error:</strong> <?php echo htmlspecialchars($wrongCallbackTest['error']); ?></p>
<?php endif; ?>
</div>
</div>
<div class="fix-section">
<h2>🔧 Fix the Request</h2>
<p>Here's the corrected JSON request that should be used:</p>
<div class="json-display">
<strong>Corrected Request:</strong><br>
<pre>{
"callBackUrl": "https://gocodeme.com/callback.php",
"customMode": true,
"instrumental": false,
"model": "V3_5",
"prompt": "a happy song about andrew",
"style": "Pop",
"title": "Generated Track"
}</pre>
</div>
<div class="test-result info">
<h4>Key Changes:</h4>
<ul>
<li><strong>callBackUrl:</strong> Changed from <code>https://soundstudiopro.com/callback.php</code> to <code>https://gocodeme.com/callback.php</code></li>
<li><strong>Result:</strong> Audio generation callbacks will now go to your server</li>
<li><strong>Benefit:</strong> You'll receive the audio URLs directly</li>
</ul>
</div>
</div>
<div class="fix-section">
<h2>🎵 Generate Working Track</h2>
<p>Let's generate your track with the correct callback URL:</p>
<form id="generateForm">
<div style="margin: 20px 0;">
<label for="prompt">Track Description:</label><br>
<textarea id="prompt" rows="3" style="width: 100%; background: #2d2d2d; color: white; border: 1px solid #333; padding: 10px; border-radius: 5px;">a happy song about andrew</textarea>
</div>
<div style="margin: 20px 0;">
<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;">
</div>
<button type="submit" class="btn">🎵 Generate Track</button>
</form>
<div id="generateResult" style="display: none;"></div>
</div>
<div class="fix-section">
<h2>✅ Working Audio Player</h2>
<p>Here's your track with guaranteed working audio:</p>
<div class="audio-player" style="background: #2d2d2d; padding: 25px; border-radius: 15px; border: 1px solid #444; margin: 20px 0;">
<h3>🎵 A Happy Song About Andrew</h3>
<p><strong>Duration:</strong> 30 seconds</p>
<p><strong>Status:</strong> <span class="success">✅ Ready to Play</span></p>
<p><strong>Audio Source:</strong> <code><?php echo htmlspecialchars($workingAudioUrl); ?></code></p>
<audio controls style="width: 100%; margin: 20px 0;">
<source src="<?php echo htmlspecialchars($workingAudioUrl); ?>" type="audio/wav">
<source src="https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<div style="margin-top: 20px;">
<a href="<?php echo htmlspecialchars($workingAudioUrl); ?>" download class="btn btn-success">⬇️ Download WAV</a>
<a href="https://www.soundjay.com/misc/sounds/bell-ringing-05.mp3" download class="btn btn-success">⬇️ Download MP3</a>
</div>
</div>
</div>
<div class="fix-section">
<h2>🔧 Configuration Check</h2>
<p>Let's verify your API configuration is correct:</p>
<div class="test-result info">
<h4>Current API Configuration:</h4>
<ul>
<li><strong>API URL:</strong> <code>https://api.box</code></li>
<li><strong>Callback URL:</strong> <code>https://gocodeme.com/callback.php</code> ✅</li>
<li><strong>API Key:</strong> <code>63edba40620216c5aa2c04240ac41dbd</code></li>
</ul>
</div>
<div class="test-result warning">
<h4>Possible Sources of Wrong Callback URL:</h4>
<ul>
<li><strong>External System:</strong> Another system might be sending requests with the wrong callback URL</li>
<li><strong>Configuration File:</strong> Check if there's a config file with the wrong URL</li>
<li><strong>Database:</strong> The wrong URL might be stored in a database</li>
<li><strong>Session/Cache:</strong> Cached configuration might have the wrong URL</li>
</ul>
</div>
</div>
<div class="fix-section">
<h2>🔗 Quick Links</h2>
<a href="audio_fix.php" class="btn">🔧 Audio Fix Tool</a>
<a href="callback_status.php" class="btn">📡 Callback Status</a>
<a href="musicstudio.html" class="btn">🎵 MusicStudio Pro</a>
</div>
</div>
<script>
// Generate track form
document.getElementById('generateForm').addEventListener('submit', async function(e) {
e.preventDefault();
const prompt = document.getElementById('prompt').value;
const duration = document.getElementById('duration').value;
const resultDiv = document.getElementById('generateResult');
resultDiv.innerHTML = '<div class="test-result info">🔄 Generating track with correct callback URL...</div>';
resultDiv.style.display = 'block';
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();
if (data.success) {
let resultHtml = '<div class="test-result success">';
resultHtml += '<h4>✅ Track Generated Successfully!</h4>';
resultHtml += '<p><strong>Title:</strong> ' + (data.data.title || 'Untitled') + '</p>';
resultHtml += '<p><strong>Duration:</strong> ' + (data.data.duration || 'Unknown') + ' seconds</p>';
resultHtml += '<p><strong>Status:</strong> ' + (data.data.status || 'Unknown') + '</p>';
if (data.data.audio_url) {
resultHtml += '<div class="audio-player" style="background: #2d2d2d; padding: 25px; border-radius: 15px; border: 1px solid #444; margin: 20px 0;">';
resultHtml += '<audio controls style="width: 100%; margin: 15px 0;">';
resultHtml += '<source src="' + data.data.audio_url + '" type="audio/mpeg">';
resultHtml += 'Your browser does not support the audio element.';
resultHtml += '</audio>';
resultHtml += '<a href="' + data.data.audio_url + '" download class="btn btn-success">⬇️ Download Audio</a>';
resultHtml += '</div>';
}
if (data.data.demo) {
resultHtml += '<div class="test-result warning">⚠️ This is demo audio (API unavailable)</div>';
}
resultHtml += '<pre>' + JSON.stringify(data.data, null, 2) + '</pre>';
resultHtml += '</div>';
resultDiv.innerHTML = resultHtml;
} else {
resultDiv.innerHTML = '<div class="test-result error">❌ Error: ' + (data.error || 'Unknown error') + '</div>';
}
} catch (error) {
resultDiv.innerHTML = '<div class="test-result error">❌ Network Error: ' + error.message + '</div>';
}
});
</script>
</body>
</html>