[PHP] Very simple PHP Habbos online counter

Do you like this?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%

  • Total voters
    0
Status
Not open for further replies.

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Simplest code I've ever made; use it for a fansite or whatever you want. I'm not bothered.

Someone called Ian asked me to make it for them before so I just released it, might come in handy one day, never know.

PHP:
<?php
$link = file_get_contents('http://www.habbo.com/community');

$online = explode('<div id="habbos-online"><div class="rounded"><span>', $link);
$online = explode('</span></div></div>', $online[1]);
$online = trim($online[0]);
$online = str_replace(' members online', '', $online);

echo 'There are '.$online.' Habbos online in <a href="http://www.habbo.com" target="_blank">Habbo.com</a>!';
?>
 
Status
Not open for further replies.

Users who are viewing this thread

Top