View Full Version : how many habbos online..
crans
22-11-2007, 06:12 PM
whats the code to get how many habbos online to show on your site?
LegendOfNoob
22-11-2007, 06:15 PM
recently done here..
but also on habboring.com
L!nK.
22-11-2007, 06:20 PM
<?php
$page = file_get_contents("http://www.habbo.co.uk");
$start = explode('<td id="topbar-count">', $page, 2);
$end = explode(' members online</td>', $start[1], 2);
$amount = trim($end[0]);
echo "There are $amount Habbos online!";
?>
I think?
Florx
22-11-2007, 06:32 PM
That wont work with the new layout!
<?php
$page = file_get_contents("http://www.habbo.co.uk");
$start = explode('<span class="stats-fig">', $page, 2);
$end = explode('</span>', $start[1], 2);
$amount = trim($end[0]);
echo "There are $amount Habbos online!";
?>
This should though
There's some script where it grabs it from an XML file, can't remember the URL to it though.
There's some script where it grabs it from an XML file, can't remember the URL to it though.
Yeah, I remember that. Advantage to that, is it'd be a whole lot faster to load.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.