Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Auto Dj

  1. #1
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    13
    Tokens
    0

    Question Auto Dj

    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.
    Last edited by Tomm; 21-01-2010 at 07:00 PM.

  2. #2
    Join Date
    Jan 2005
    Location
    Brighton.
    Posts
    4,285
    Tokens
    1,183

    Latest Awards:

    Default

    I think you should change all the F's to Z's then that should help your problem.
    Incase you cannot read my signature properly, my user name on runescape is Scriptermone.

    *Image Removed*
    *Image Removed*
    *Image Removed*

    Signature edited by Agesilaus (Forum Super Moderator): Please do not have signature images that go over the total height size allowed for your user group.

  3. #3
    Join Date
    Aug 2009
    Location
    JANET DEVLIN
    Posts
    111
    Tokens
    42
    Habbo
    GaGa?!

    Default

    we are currently having that problem also at checkhabbo DJ Panel radio stats. However i dunno the php code im just a head dj
    10 DAYS TO THE MONSTER BALL!


    RAWR! It's GAGA!

  4. #4
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    13
    Tokens
    0

    Post Auto DJ

    Quote Originally Posted by Scriptermone View Post
    I think you should change all the F's to Z's then that should help your problem.
    Im not sure what you mean, If you mean change literally every F to a Z i dont think that would help. In fact knowing my luck it would probebly mess it up even more :rolleyes_ Thank you both for your help though and i hope i can get it sorted.

  5. #5
    Join Date
    Aug 2009
    Location
    JANET DEVLIN
    Posts
    111
    Tokens
    42
    Habbo
    GaGa?!

    Default

    I am GUESSING there is something wrong with
    <br>
    <br> section of the code maybe only one is ment to be there. or the last one be like <br/>

    Maybe change it to Ask the Habbox Staff? hope i atleast helped a little

    EDIT - I know habboemotion is auto DJ you could contact one of their owners
    hope i helped
    Last edited by Randomme; 20-01-2010 at 02:41 PM. Reason: New information
    10 DAYS TO THE MONSTER BALL!


    RAWR! It's GAGA!

  6. #6
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    13
    Tokens
    0

    Post Auto DJ

    Quote Originally Posted by Randomme View Post
    I am GUESSING there is something wrong with
    <br>
    <br> section of the code maybe only one is ment to be there. or the last one be like <br/>

    Maybe change it to Ask the Habbox Staff? hope i atleast helped a little

    EDIT - I know habboemotion is auto DJ you could contact one of their owners
    hope i helped
    Thanks for all the help but i dont think its to do with the line breaks cus obviously it would just move the texts down to the next line and habboemotion are streaming from defjay.com (I used to steam from them on my site too lol) But again thanks a lot for your help

  7. #7
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    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>
    Edit; after trying to clear this code up to a working state, there is no file at "http://shoutcasts.tech-hosts.com/cas...rol.php" so it won't work. Give me the right file and I'll clear up the code.
    Last edited by Blob; 20-01-2010 at 07:02 PM.

  8. #8
    Join Date
    Aug 2009
    Location
    JANET DEVLIN
    Posts
    111
    Tokens
    42
    Habbo
    GaGa?!

    Default

    It mentioned something about line 12 (I AM NO EXPERT) but the below is line 12 lol. maybe HabboListen is ment to be in there? :S



    ''modify to the name of the file you put this in''
    10 DAYS TO THE MONSTER BALL!


    RAWR! It's GAGA!

  9. #9
    Join Date
    Jan 2010
    Location
    Nottingham
    Posts
    13
    Tokens
    0

    Post Auto DJ

    Sorry I dont know why it put the ... where the rest of that file name should be. This is the correct script. Thank you everyone for you help.

    PHP Code:
    <html>
    <head>
    <title>Check and modify auto DJ</title>
    </head>
    <body>
    Current Status: 
    <?php
    $adminpassword 
    "plr6a1w2"// modify to your SHOUTcast server admin 
    password
    $shoutcastport 
    "9046"// modify to your SHOUTcast server port
    $nameoffile "http://habbolistenfm.com/housekeepingguy/staff/autodj.php" // 
    modify to the name of the file you put this in
    $checkstatus 

    file_get_contents("http://shoutcasts.tech-hosts.com/castcontrol/control.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/castcontrol/control.php?action
    =start&portbase=" 
    $shoutcastport "&adminpassword=" $adminpassword "");
    echo 
    "<b>" $start "</b>";
    }
    else {
    $stop 
    file_get_contents("http://shoutcasts.tech-hosts.com/castcontrol/control.php?action
    =stop&portbase=" 
    $shoutcastport "&adminpassword=" $adminpassword "");
    echo 
    "<b>" $stop "</b>";
    }
    ?>
    </body>
    </html>

  10. #10
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    the comments need to be on the same lines as the //s

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •