I am getting the following error message when trying to add php code to my site, can anyone help?
"Parse error: syntax error, unexpected T_VARIABLE in /home/habboli1/public_html/housekeepingguy/staff/autodj.php on line 12"
The following is the php code:
<html>
<head>
<title>Check and modify auto DJ</title>
</head>
<body>
Current Status:
<?php
$adminpassword = "xxxxxxxx"; // modify to your SHOUTcast server admin
password
$shoutcastport = "xxxx"; // modify to your SHOUTcast server port
$nameoffile = "autodj.php" //
modify to the name of the file you put this in
$checkstatus =
file_get_contents("http://shoutcasts.tech-hosts.com/cas...rol.php?action
=status&portbase=" . $shoutcastport . "&adminpassword=" . $adminpassword . "");
if($checkstatus == "AutoDJ is online.") { echo "<font
color='green'>Online!</font>"; }
else { echo "<font color='red'>Offline!</font>"; }
?><br>
<br>
<?php
$action = $_GET['action'];
if(!isset($action)) { ?>
Please use the links below to control the Auto DJ:<br><br>
<center>
<a href="" . $nameoffile . "?action=start">Start Auto DJ</a>
<br>
<br>
<a href="" . $nameoffile . "?action=stop">Stop Auto DJ</a>
</center>
<?php } elseif($action == "start")
{
$start =
file_get_contents("http://shoutcasts.tech-hosts.com/cas...rol.php?action
=start&portbase=" . $shoutcastport . "&adminpassword=" . $adminpassword . "");
echo "<b>" . $start . "</b>";
}
else {
$stop =
file_get_contents("http://shoutcasts.tech-hosts.com/cas...rol.php?action
=stop&portbase=" . $shoutcastport . "&adminpassword=" . $adminpassword . "");
echo "<b>" . $stop . "</b>";
}
?>
</body>
</html>
I have noticed that there are quotation marks inside quotation marks which as i understand would mess the whole thing up but i didnt write this code but i do need help to fix it. Thanks for anyones help
Moved by Tomm (Forum Moderator): From Forum Designing.





Reply With Quote

im just a head dj 




