Does anyone have a script that does this:
http://habbostatic.com/stats/stats4.php
Or something like it with the clock and hits etc.
Thanks,
Verrou
Printable View
Does anyone have a script that does this:
http://habbostatic.com/stats/stats4.php
Or something like it with the clock and hits etc.
Thanks,
Verrou
I think he means, has any one got the script where he can put it on his webpage like they have done ^.~
Need to use JS for the clock.
http://thybag.co.uk/#p=Tutorials&ind=25
That has some very usefully php codes that may help you :).
http://www.techtuts.com/forums/index.php?showtopic=29 for all the 'hits'
I'll code it now.
Give me about 15mins.
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>");
?>
Wow thanks so much! ++REP
Also rep to anyone for the clock.
Uh:
Quote:
Warning: fopen() expects parameter 1 to be string, array given in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 11 Warning: fputs(): supplied argument is not a valid stream resource in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 12 Warning: fclose(): supplied argument is not a valid stream resource in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 13 Hits Today: 1
Warning: fopen() expects parameter 1 to be string, array given in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 29 Warning: fputs(): supplied argument is not a valid stream resource in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 30 Warning: fclose(): supplied argument is not a valid stream resource in /hsphere/local/home/iswestim/habboeden.com/stats/stats.php on line 31 Hits Overall: 1
Users Online: 1
Your IP: XXX.XXX.XXX.XXX
Fansite Status: Unofficial
Soz can't edit, here's a direct link: http://habboeden.com/stats/stats.php
Try changing:
to:PHP Code:$hits = ("hits.txt");
$hits = file($hits);
PHP Code:$hits = "hits.txt";
Was about to say what Invent did, goddamn your greatness Simon...
Glad you like it Verrou.
I'll put it on my localhost and see if Simon's fix works.
EDIT: Verrou, would you mind if I recoded this in SQL? It's so much easier for us both.
Shure, plus you could add clock then right?
EDIT: Simon's fix didn't work :S I'll hold tight for the SQL version :D
www.habbo-center.com/scripts/onl.php
It has unique hits and how many guests are currently viewing page and admin CP.
cba to add more features atm.
It didn't work because of the file(); functions, which are dodgey and easy to hack... After I have dinner I'll start work, I assume you can execute SQL queries and such?
Clock would be JavaScript because of the way it automatically updates, but I could do it.
Is that usersystem off TechTuts, I hope not, cause you've made up copyrights when it's not you who made it.Quote:
Originally Posted by cj555
Found a clock script:
Found on hot scriptsCode:<script language="JavaScript">
<!--
//Supplied free by js.brimonet.com
var clockID = 0;
function UpdateClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}
var tDate = new Date();
document.theClock.theTime.value = ""
+ tDate.getHours() + ":"
+ tDate.getMinutes() + ":"
+ tDate.getSeconds();
clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
clockID = setTimeout("UpdateClock()", 500);
}
function KillClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}
}
//-->
</script>
<body onload="StartClock()" onunload="KillClock()">
<center><form name="theClock">
<input type=text name="theTime" size=8 style="border:0px;">
<form></center>
Link: Is here!
(will look around for a hit counter etc)
Sorry about forgetting, it slipped my mind. I'll start work tommorow on it, due to mysewlf being currntly shattered.
Shattered as in:
:eusa_wall or :(
No, like Tired but there's no emote for it.
kk lol
EDIT: Is there still a working "Habbo's in hotel" script i need one quickly for AU please.
Yeah there's one in this.
BTW: Gotta fix a db connection error then I'll pm you the .zip (:
Merci Boucoup :) Do u play au? Cuz i cud drop u a few hcs :D
Yeah, occasionally.
I prefer UK if you have anything there?
I think i have a few hcs on uk, um and i have a minor problem:
http://andrehamon.evenhosting.com/stats/