Displaying how many users are on your site is quite simple. I cannot be bothered posting seeing as I'm kind of eating, yet I advise you to view: http://www.roscripts.com/How_many_vi...cript-108.html

Displaying how many users are on your site is quite simple. I cannot be bothered posting seeing as I'm kind of eating, yet I advise you to view: http://www.roscripts.com/How_many_vi...cript-108.html
That's the code you'd use if you were to want a online users counter on your own site. Seeing as we can't write PHP onto the Habbo servers ourselves we just use the code in the original post to take the amount off the actual homepage. Both are completely different scriptsDisplaying how many users are on your site is quite simple. I cannot be bothered posting seeing as I'm kind of eating, yet I advise you to view: http://www.roscripts.com/How_many_vi...cript-108.html.
thanks guys.
KYLE SMITH
Anyone got the current code for this?
Ty in advance
As i sent to you in PM:
PHP Code:<?php
$hotel = file_get_contents("http://www.habbo.co.uk/");
$start = explode('<span class="stats-fig">', $hotel, 2);
$end = explode('</span>', $start[1], 2);
$habbo = trim($end[0]);
echo("Habbos online: $habbo");
?>
would it work if i host this scrpt on **********?
Or if not, anyone know where i can host it for free?
This is just what I needed,
thanks!
- Lee
Student Pilot EGBW | Cessna 152 G-BHPY G-BTVW
Passed Air Law exam April 25th
Is a bit more efficient, unfortunately habbo.com isn't a fan of file_get_contents any more.
PHP Code:<?php
$page = file_get_contents("http://www.habbo.fr"); // Change the URL to the hotel you would like
$pattern = '/<span class="stats-fig">(.*?)<\/span>/s';
preg_match( $pattern , $page , $out );
echo "There are $out[1] Habbos online!"; // Set the message you want to be displayed (Leave in the $amount)
?>
Chippiewill.
Want to hide these adverts? Register an account for free!