I have mp3 website where is when i click to download getting some error like this so i can fix this issue please help me out i m waiting for you guys so please tel me i also remove that space but still issue this if full code when i click on download its redirect to home page this is different question before i did not explain full now here is full with full code as well
PHP Parse error: syntax error, unexpected '$title' (T_VARIABLE) in /home/xxx/public_html/xxxx/xxxx/themes/xxxx/functions/source/download_mp3.php on line 42
<?php
require_once('../../../../../wp-load.php');
if(isset($_REQUEST['filename'])) {
$filename = $_REQUEST['filename'];
} else {
echo '<p>No id passed in</p>';
exit;
}
function checkRemoteFile($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
// don't download content
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if(curl_exec($ch)!==FALSE){
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (($code == 301) || ($code == 302)) {
return false;
}else{
return true;
}
}else{
return false;
}
}
$checkMp3 = checkRemoteFile( base64_url_decode( $filename ) );
$title=$_GET['ref'];
$mp3file = base64_url_decode( $filename );
if($checkMp3){
?>
<html>
<head>
<title>Download Mp3</title>
</head>
<body>
<div class="downButtons" style="margin:5px">
<b class="red">Choose a server to download your song!</b>
<br><br><a rel="nofollow" target="_blank" title="Right Click to Download Mp3"class="dr dss" href="/download?mp3=<?php echo $mp3file;?>&title=<?php echo $title;?>"><img style="max-height:60px"src="http://ppp.com/download.jpg"></a>
</body>
</html>
<?php
}
else
{
echo '<div style="font-size:11px;text-align: center;color: black;">file not found, try other download link</div>';
}
?>
here is line no 42 error code
<br><br><a rel="nofollow" target="_blank" title="Right Click to Download Mp3"class="dr dss" href="/download?mp3=<?php echo $mp3file;?>&title=<?php echo $title;?>"><img style="max-height:60px"src="http://ppp.com/download.jpg"></a>