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!


Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default re-coded request line for crazy habbo

    I made it so u cant submit a request when theres no dj on air

    Name this request.php:

    PHP Code:
    <? session_start();
    include 
    'dbConfig.php';
    $ip $_SERVER['REMOTE_ADDR']; //get the ip of the current user
    ?>
    <?php
    include("request_stats.php");
    if(
    $streamstatus == 0)
    {
        die(
    "<link href=\"KristallPanel/css.css\" type=\"text/css\" rel=\"stylesheet\">
        <font face=verdana size=1 color=#FF0000><b>Clubbing Habbos request line</b></font><br/><br/><font face=verdana size=1 color=#FF0000>Hi there. Sorry but you cannot submit a request at the minute<br/>This is because nobody is DJing<br/>Please check back later when there is a DJ on</font>"
    );
    }
    ?>
    <font face="Verdana" size="1" color=#FF0000>
    <?
    if($_GET["action"] == "send") {
    if(
    $dj_name == "Choose One...") { echo "<b><font face=Verdana color=#FF0000 size=2>You Must Select a Dj!<br>"; exit; }
    $dj_name $_POST["dj_name"];
    $request stripslashes($_POST["request"]);
    $type $_POST["type"];
    $ip getenv("REMOTE_ADDR");
    $username $_POST['username'];
    $query mysql_query("INSERT INTO `requests` (`habboname`, `type`, `dj_name`, `message`, `ip`, `date`) VALUES('$username', '$type', '$dj_name', '$request', '$ip', NOW() )");
    echo 
    " Request sent!";} else { 
    echo 
    "
    <form method='post' action='
    $PHP_SELF?action=send'>

    <table border='0'>
    <tr>

    <b>Habbo Name:</b> <input name=\"username\" type=\"text\" id=\"username\">

    <td valign='top' align='left'><font face='Verdana' size='1'  color='#FF0000'><b>Type:</b><br>
    <font size='1' face='Verdana'><select name='type' size='1'>
    <option value='DJ Request'>Request</option>
    <option value='DJ Shoutout'>Shoutout</option>
    <option value='DJ Joke'>Joke</option>
    <option value='DJ Other'>Other</option>"
    ;}
    echo 
    "</select></font></td>
    </tr><tr>
    <td valign='top' align='left'><font face='Verdana' size='1'  color='#FF0000'><b>Dj Name:</b><br>
    <select size='1' name='dj_name'><option selected>Choose One...</option>
    "
    ;
    $result mysql_query("SELECT * FROM `staff`");
    while(
    $worked mysql_fetch_array($result)) {
    $rusername $worked["username"];
    echo 
    "<option value=$rusername>DJ $rusername</option>
    "
    ;
    }
    mysql_close();
    echo 
    "</select></td>
    </tr><tr>
    <td valign='top' align='left'><font face='Verdana' size='1'  color='#FF0000'><b>Message:</b><br>
    <textarea rows='5' cols='23' type='text' name='request' class='button'></textarea></font></td>
    </tr>
    <tr>
    <td valign='top' align='left'><font face='Verdana' size='1'  color='#183139'><input type='submit' name='submit' value='Send'></font></td>
    </tr>
    </table>
    </form>"
    ;
    ?>
    <br>             


    <body text="#FF0000" <body bgcolor="#FFFFFF">
    </font></font></font>
    <script type=text/javasctipy> 
    <!--
    windows.location= "http://louis.wrighthost.sharpehosting.com/request1.php
    //-->
    </script>
    Name this request_stats.php:

    PHP Code:
    <?php
    // Shoutcast Server Stats
    // Parses shoutcasts xml to make an effective stats thing for any website
    // ©2004-2005 Daniel Brown http://www.gmtt.co.uk

    include('config_radio.php');

    $scfp fsockopen("$scip"$scport, &$errno, &$errstr30);
     if(!
    $scfp) {
      
    $scsuccs=1;
    echo
    ''.$scdef.' is Offline'
     }
    if(
    $scsuccs!=1){
     
    fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
     while(!
    feof($scfp)) {
      
    $page .= fgets($scfp1000);
     }
    ######################################################################################################################
    /////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    //define  xml elements
     
    $loop = array("STREAMSTATUS""BITRATE""SERVERTITLE""CURRENTLISTENERS""MAXLISTENERS""BITRATE");
     
    $y=0;
     while(
    $loop[$y]!=''){
      
    $pageed ereg_replace(".*<$loop[$y]>"""$page);
      
    $scphp strtolower($loop[$y]);
      $
    $scphp ereg_replace("</$loop[$y]>.*"""$pageed);
      if(
    $loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
       $
    $scphp urldecode($$scphp);

    // uncomment the next line to see all variables
    //echo'$'.$scphp.' = '.$$scphp.'<br>';
      
    $y++;
     }
    //end intro xml elements
    ######################################################################################################################
    ######################################################################################################################
    /////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    //get song info and history
     
    $pageed ereg_replace(".*<SONGHISTORY>"""$page);
     
    $pageed ereg_replace("<SONGHISTORY>.*"""$pageed);
     
    $songatime explode("<SONG>"$pageed);
     
    $r=1;
     while(
    $songatime[$r]!=""){
      
    $t=$r-1;
      
    $playedat[$t] = ereg_replace(".*<PLAYEDAT>"""$songatime[$r]);
      
    $playedat[$t] = ereg_replace("</PLAYEDAT>.*"""$playedat[$t]);
      
    $song[$t] = ereg_replace(".*<TITLE>"""$songatime[$r]);
      
    $song[$t] = ereg_replace("</TITLE>.*"""$song[$t]);
      
    $song[$t] = urldecode($song[$t]);
      
    $dj[$t] = ereg_replace(".*<SERVERTITLE>"""$page);
      
    $dj[$t] = ereg_replace("</SERVERTITLE>.*"""$pageed);
    $r++;
     }
    //end song info
    fclose($scfp);
    }
    ?>
    Enjoy!

    Oh and make sure you have a config_radio.php in same folder otherwise it wont work.
    Last edited by beer; 22-12-2006 at 09:00 AM.

  2. #2
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default

    oh sorry title is meant to say "for crazy habbo dj panel" lol. Cant edit

  3. #3
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    389
    Tokens
    0

    Default

    just another reason for a bump.

    -rep

  4. #4
    Join Date
    Nov 2006
    Location
    Leeds, Yorkshire
    Posts
    992
    Tokens
    0

    Default

    Quote Originally Posted by Tekn View Post
    just another reason for a bump.

    -rep
    Just another reason to be an idiot.

    -rep


  5. #5
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default

    thats kl.

  6. #6
    Join Date
    Dec 2006
    Location
    da hood.
    Posts
    274
    Tokens
    0

    Default

    Quote Originally Posted by Tekn View Post
    just another reason for a bump.

    -rep
    Your a disturbed child, cant trust noone can you?

    Edited by micky.blue.eyes (Super Moderator): Please don't be rude towards other members.
    Last edited by micky.blue.eyes; 22-12-2006 at 11:15 AM.


    Cool people: Spaceinvader, Xeoro, RNelson, -1., Redtom, Sam, Tomm, snail.


  7. #7
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    389
    Tokens
    0

    Default

    Can't trust no-one/

    Man, what the hell are you talking about.

    ...disturbed wth?

  8. #8
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Sorry misread. +rep
    Last edited by Invent; 22-12-2006 at 11:07 AM.

  9. #9
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    389
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    Why would you want to send a request when there is no DJ?...I dont get it...
    He's edited the code, so that when there's no DJ online - when you send a request it doesn't go through to stop people from doing just that.

  10. #10
    Join Date
    Aug 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,351
    Tokens
    0

    Latest Awards:

    Default

    some ppl do. called spamming. I made it so request line is disabled when theres no DJ on air

Posting Permissions

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