Sorry about waiting;
Can't be bothered doing a script to grab the online Habbo's off the real site, but all of this should work.
Features:-
Hits Today
Hits Overall
Users Online (used FastOnlineUsers, 'cause I cbf doing JavaScript)
Your IP
Fansite Status
Edit the variable $domain to your domain and $status to Official if your fansite is official and Un-Official if it isn't.
Make 2 text files in the same directory as this script, one called hits.txt and one called hits_today.txt
PHP Code:<?php
$domain = "www.whatever-your-domain-is.com";
$status = "Un-Official";
////////////////////////////////////////////////////////
echo("<font size=\"2\" face=\"Verdana\">");
$date = date("G");
$ip = $_SERVER['REMOTE_ADDR'];
$hits_today = ("hits_today.txt");
$hits_today = file($hits_today);
$hits_today[0] ++;
$fp = fopen($hits_today, "w");
fputs($fp , "$hits_today[0]");
fclose($fp);
//Above code adds 1 hit to the hits_today.txt file.
if($date == "23"){
$fp = fopen($hits_today , "w");
fputs($fp , " ");
fclose($fp);
}
//Above code wipes the hits_today.txt file when the time is 23. Basically 11 o'clock at night.
echo("Hits Today: $hits_today[0]<br>");
//Above code tells your users the hits today
$hits = ("hits.txt");
$hits = file($hits);
$hits[0] ++;
$fp = fopen($hits, "w");
fputs($fp , "$hits[0]");
fclose($fp);
//Above code adds 1 hit to hits.txt file whenever someone hits.
echo("Hits Overall: $hits[0]<br>");
//Above code tells the user hits overall.
echo("Users Online: <script type=\"text/javascript\" src=\"http://fastonlineusers.com/on3.php?d=$domain\"></script><br>");
//Above code tells the user the amount of people online.
echo("Your IP: $ip<br>");
//Above code tells the user their IP address.
echo("Fansite Status: $status<br>");
//Above code tells the user if the fansite is official.
echo("</font>");
?>


Reply With Quote





