Hey, i was wondering what the php code is for this, of course it changes when people come onto the site.
People Online: 0
Thanks
Matt

Hey, i was wondering what the php code is for this, of course it changes when people come onto the site.
People Online: 0
Thanks
Matt
I owe rep to:
NintendoNews & Luckyrare
try http://www.dynamicdrive.com/
- Nelly
:| thats a dhtml and javascript site fool..
Chilimagik.net // Reviews, Band Biographies, News, Pics + Loads More!!
[Thybag.co.uk - Vive la revolutione]
<?
/*This snippet will display a welcome message depending on the time of day
You can change the messages displayed below.
Feel free to use and modify to your liking.
Visit glomer.net for more information or e-mail:
tate at tatenations dot com
USAGE:
Simply plug into your site and change the messages to whatever you want.
*/
//Change the messages to what you want.
$afternoon = " ";
$evening = " ";
$late = " ";
$moring = " ";
//No need to edit any further
//Get the current hour
$current_time = date(G);
//Get the current day
$current_day = date(l);
//12 p.m. - 5 p.m.
if ($current_time >= 12 && $current_time <= 17) {
echo $afternoon;
}
// 6 p.m. to 11 p.m.
elseif ($current_time >= 18 && $current_time <= 24) {
echo $evening;
}
//12 a.m. - 5 a.m.
elseif ($current_time >= 1 && $current_time <= 5) {
echo $late;
}
// 6 a.m. to 11 a.m.
elseif ($current_time >= 6 && $current_time <= 11) {
echo $morning;
}
echo "<b>Time:</b> ";
$date = date("m/j/y");
$time =date('H:i:s');
echo "$time <br> <b>Date:</b> $date<br>"
?>
<?
$remote = $_SERVER["REMOTE_ADDR"];
$file = "usersonline.txt";
$timeoutseconds = 60; //Tells how long the user is considered "on line"
$timestamp = time();
$timeout = ($timestamp-$timeoutseconds);
$fp = fopen("$file", "a+");
$write = $remote."||".$timestamp."\n";
fwrite($fp, $write);
fclose($fp);
$online_array = array();
$file_array = file($file);
foreach($file_array as $newdata){
list($ip, $time) = explode("||", $newdata);
if($time >= $timeout){
array_push($online_array, $ip);
}
}
$online_array = array_unique($online_array);
$online = count($online_array);
if($online == "1"){
echo "<b>Habbos Online:</b> $online ";
}else{
echo "<br><b>Habbos Online:</b> $online ";
}
?>
<?
echo " <br><b>Hits:</b> "
?>
<?
$file = "counter.txt";
$open = fopen($file, "r");
$size = filesize($file);
$count = fread($open, $size);
$count1 = $count+1;
echo($count1);
fclose($open);
$open = fopen($file, "w");
fwrite($open, $count1);
fclose($open);
echo " ";
?>
hits.php
counter.txt
usersonline.txt
Nice code + Rep.
I owe rep to:
NintendoNews & Luckyrare
Thanks. ;P
Wow... Well Done+Rep
Never argue with an idiot, he'll drag you down to his level, and beat you with experience.
And 15 mins later...Originally Posted by Recursion
*oh trust me
*I would NEVER go ATi
Sapphire ATI Radeon HD 5850 1024MB GDDR5 PCI-Express Graphics Card £195.73 1 £195.73
*ordered.
Post this in that code in the tutorial section. It rules
I owe rep to:
NintendoNews & Luckyrare
I don't have permission to post in that forum & thanks again for the rep.
I forgot to add the IP,
<?
$domain = GetHostByName($REMOTE_ADDR);
?>
Nice!. You should try and get permission
![]()
I owe rep to:
NintendoNews & Luckyrare
Want to hide these adverts? Register an account for free!