Banner with Online Count ( No Other File Needed )

Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Account Upgraded | Title Enabled! FreeZa™ is offline
    MemberRank
    Jun 2008 Join Date
    In the JungleLocation
    274Posts

    Banner with Online Count ( No Other File Needed )

    Hello,

    i have seen this been released but i thought i'd let my code out as it doesn't need an external file some people need as an online.cfm or online.php

    PHP Code:
    <?php

    $dbhost 
    'localhost';
    $dbuser 'Username';
    $dbpass 'Password';
    $dbname 'Database';

    $conn mysql_connect($dbhost$dbuser$dbpass) or die                      ('Error connecting to mysql');
    mysql_select_db($dbname);

    $result mysql_query("SELECT * FROM server_status");

    $row mysql_fetch_array$result );
    $text "Habbos Online";
    $image imagecreatefrompng('images/02.png');
    $black imagecolorallocate($image000);
    imagefttext($image8018280$black'./verdanab.ttf'$row['users_online']);
    // imagefttext($image, 8, 0, 182, 75, $black, './verdana.ttf', $text); // Remove the // ahead of this line to use it
    header('Content-type: image/png');
    imagepng($image);
    imagedestroy($image);
    ?>
    Use this code or download it Here

    Replace the image.

    Credits All To Me


  2. #2
    Garry's Mod is addictive! Law is offline
    MemberRank
    Dec 2009 Join Date
    NorwayLocation
    993Posts

    Re: Banner with Online Count ( No Other File Needed )

    WOW, changing mine and Hejula's code A LITTLE you should be proud

    NOOT.

  3. #3
    Banned Someuser is offline
    BannedRank
    Aug 2010 Join Date
    466Posts

    Re: Banner with Online Count ( No Other File Needed )

    And this would spam your MySQL server over if i would DoS at that file.

  4. #4
    Minor Devolper ntl200 is offline
    MemberRank
    Dec 2007 Join Date
    EnglandLocation
    538Posts

    Re: Banner with Online Count ( No Other File Needed )

    shh :) i know whos release im using lol

  5. #5
    Proficient Member </Meap> is offline
    MemberRank
    Jul 2010 Join Date
    159Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by reptilon View Post
    WOW, changing mine and Hejula's code A LITTLE you should be proud

    NOOT.
    for your information dickweed, Edward coded this well before you lot
    I was one of the first people to have this code
    hes had this code since he re-opened clan and habbobz and merged them
    get your facts right
    go back to school :)

  6. #6
    Garry's Mod is addictive! Law is offline
    MemberRank
    Dec 2009 Join Date
    NorwayLocation
    993Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by Danny95 View Post
    for your information dickweed, Edward coded this well before you lot
    I was one of the first people to have this code
    hes had this code since he re-opened clan and habbobz and merged them
    get your facts right
    go back to school :)
    I'm on springbreak

    /facepalm

    And oh, then it is okay..

    And he released it before me too, soz sorry :P
    Last edited by Law; 18-04-11 at 01:19 PM.

  7. #7
    Account Upgraded | Title Enabled! FreeZa™ is offline
    MemberRank
    Jun 2008 Join Date
    In the JungleLocation
    274Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by Someuser View Post
    And this would spam your MySQL server over if i would DoS at that file.
    Very Nice Like no1 knew your could spam reloading the online.cfm or online.php or Any damn page of a CMS which includes user details.

    Grow Up, Stop Trolling.

  8. #8
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: Banner with Online Count ( No Other File Needed )

    MUCH better code, use this!


    You are not reading a whole ROW from a db only 1 colum so it's best to use mysql_result.

    Also I added functions so it would be less laggy (:

    So a MUCH better example would be:

    Set the pic and font path yourselfs in order for it to work! (:

    http://pastebin.com/C6Zz0ed3
    Last edited by Quackster; 18-04-11 at 02:18 PM.

  9. #9
    Account Upgraded | Title Enabled! FreeZa™ is offline
    MemberRank
    Jun 2008 Join Date
    In the JungleLocation
    274Posts

    Re: Banner with Online Count ( No Other File Needed )

    Thanks xD

  10. #10
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by FreeZa™ View Post
    Thanks xD
    Fixed the snippet, text wasn't showing.

    Now it does, cheers. (:

  11. #11
    Account Upgraded | Title Enabled! mmaxwell is offline
    MemberRank
    Sep 2009 Join Date
    403Posts

    Re: Banner with Online Count ( No Other File Needed )

    could someone do this with phpretro useing system table that shows the users online

  12. #12
    Proficient Member </Meap> is offline
    MemberRank
    Jul 2010 Join Date
    159Posts

    Re: Banner with Online Count ( No Other File Needed )

    Edwards code by itself works fine for me so Im cool :)

  13. #13
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by mmaxwell View Post
    could someone do this with phpretro useing system table that shows the users online
    Here, should work for holograph.
    Change the image path and font path!

    Press the 'like' button if I helped :)

    http://pastebin.com/PEjdvXpd

  14. #14
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Banner with Online Count ( No Other File Needed )

    Great release, thanks for sharing. I'll use this on my localhost to test it out and make modifications to it :)

    @Quackster - cba to press 'Like' as i'm lazy.

  15. #15
    Garry's Mod is addictive! Law is offline
    MemberRank
    Dec 2009 Join Date
    NorwayLocation
    993Posts

    Re: Banner with Online Count ( No Other File Needed )

    Quote Originally Posted by mmaxwell View Post
    could someone do this with phpretro useing system table that shows the users online
    There is one for phpretro...

    credits goes to FreeZa™

    PHP Code:
    <?php

    $dbhost 
    'localhost';
    $dbuser 'Username';
    $dbpass 'Password';
    $dbname 'Database';

    $conn mysql_connect($dbhost$dbuser$dbpass) or die                      ('Error connecting to mysql');
    mysql_select_db($dbname);

    $result mysql_query("SELECT * FROM system");

    $row mysql_fetch_array$result );
    $text "Habbos Online";
    $image imagecreatefrompng('images/02.png');
    $black imagecolorallocate($image000);
    imagefttext($image8018280$black'./verdanab.ttf'$row['onlinecount']);
    // imagefttext($image, 8, 0, 182, 75, $black, './verdana.ttf', $text); // Remove the // ahead of this line to use it
    header('Content-type: image/png');
    imagepng($image);
    imagedestroy($image);
    ?>



Page 1 of 3 123 LastLast

Advertisement