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 3 of 3
  1. #1
    Join Date
    Apr 2006
    Location
    London, England
    Posts
    696
    Tokens
    0

    Default Need Dj Says Php

    need the php code for DJ says,

    also how ichange background of the dj says aswel?
    ;veni vidi vici
    ;i came, i saw, i ownt

  2. #2
    Join Date
    Feb 2006
    Location
    Playhabbo Offices
    Posts
    272
    Tokens
    0

    Default

    I have a php code for a Dj says for this dj says i have.

    Thanks Adiculantes for this ^^


    ¥ • Playhabbo.co.uk Owner • ¥

    Post Count: 50 - 100 - 150 - 200 - 250 - 300

  3. #3
    Join Date
    Dec 2005
    Location
    England | Brighton
    Posts
    1,378
    Tokens
    0

    Latest Awards:

    Default

    Hey

    Very basic DJ Says.

    Make a page called djform.php and put in the following code:


    HTML Code:
    HTML Code:
     <form action="phpcode.php" method="post" name="form1" target="_self">
    <p>
    <label>DJ Name:
    <input name="djname" type="text" id="djname">
    </label>
    <br> 
    <label><br>
    DJ Message: <br>
    <textarea name="message" cols="35" id="message"></textarea>
    </label>
    </p>
    <p>
    <label>
    <input type="submit" name="Submit" value="Submit Message">
    </label>
    </p>
    </form>
    Then Customize that page to how you wish, different background color etc. Also when the DJ puts in there name they must only type the second part such as Ice not DJ Ice.

    OK, now make a page called phpcode.php and insert the following:


    PHP Code:
    PHP Code:
    <?php $myFile "testFile.txt";
    $fh fopen($myFile'w') or die("can't open file");
    $stringData "DJ $djname Says: $message\n";
    fwrite($fh$stringData);
    fclose($fh); ?>

    <!-------Now make the rest of the page here, make sure that the code above stays at the top!--------!>
    OK, now once you have used djform.php, it will lead to phpcode.php which will then create a file called testFile.txt on the same directory as all the other files above are in. You must then CHMOD testFile.txt to 666 if it isn't already done. So the DJ Says is located in testFile.txt. If your not bothered about formatting then just set testFile.txt to the DJ Message page.

    Formatting:

    Create a page called djmessage.php and put in the following in the body part of the page:


    PHP Code:
    PHP Code:
    <?php include("testFile.txt) ?>
    Then customize the page as you would normally. Then set the DJ Page to djmessage.php. Please note all the above files would work exactly how they are if in the same directory. If you want them in different directorys you will have to fiddle with the code. you MUST CHMOD the testFile.txt to 666 or it will not be writeable.


    That tutorial was created by DJ=ICE

Posting Permissions

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