View Full Version : Site stats script || Rep to all that help
-::Mr.Dave::-
10-04-2006, 07:33 PM
does anyone know the site stats script to see how many visitors you have had and ip addys and unique hits etc
anyone who could put it on as a post or can send me the file or give a link to a website with the script i will give Rep to
Also does anyone know the script for showing how many habbos are online
Rep given to all that help
Negative for those who spam or want to charge for it
Splinter
10-04-2006, 07:34 PM
this should help ..http://thybag.co.uk/index.php?p=Tutorials&ind=25
http://showip.net/show_ext.php Good tutorial for showing IP.
I use this on my website though.
<script language="javascript">
function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>
-::Mr.Dave::-
10-04-2006, 07:44 PM
Rep given to both
Mentor
10-04-2006, 08:31 PM
Just as an untested cheep 5 second grabber, this may work in getting the amount of habbo users of habbohotels site.
for uk hotel
<?php
//get page
$lines = file('http://www.habbohotel.co.uk/');
//Get line
echo $lines['71']; // may be line 72
?>
That theorticly should echo out "11,174 Habbos online"
But with the correct amount of habbos online.
COuld be made to just get number very simply as well.
-::Mr.Dave::-
10-04-2006, 08:40 PM
awesome it echos currently 10.237 habbos online which is correct
any chance of adding a lil text so it says
Current Habbos Online:
I use this on my website though.
<script language="javascript">
function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>
Wth is that.
-::Mr.Dave::-
10-04-2006, 08:46 PM
Can anyone write me a php script and post it so that it shows the same info as radiohabbo's stats
the tutorial on thybags i dont understand to well
Mentor
10-04-2006, 08:46 PM
Humm im to lazy to test but this may work..
<?php
//get page
$lines = file('http://www.habbohotel.co.uk/');
//Get line
$Ndata = $lines['71']; // may be line 72
//Remove what we dont want
$Ndata = str_replace('<div id="toolbar-habbocount">', '', $Ndata);
$Ndata = str_replace("Habbos online</div>", "", $Ndata);
// Add text and output
echo "Current Habbos Online: ".$Ndata;
?>
-::Mr.Dave::-
10-04-2006, 08:48 PM
Humm im to lazy to test but this may work..
<?php
//get page
$lines = file('http://www.habbohotel.co.uk/');
//Get line
$Ndata = $lines['71']; // may be line 72
//Remove what we dont want
$Ndata = str_replace('<div id="toolbar-habbocount">', '', $Ndata);
$Ndata = str_replace("Habbos online</div>", "", $Ndata);
// Add text and output
echo "Current Habbos Online: ".$Ndata;
?>
you get this
Parse error: syntax error, unexpected T_STRING in /home/habboatt/public_html/test/online2.php on line 9
Mentor
10-04-2006, 08:52 PM
Was that the version id rembered to change " to ' or not "/
Just tested, works fine, i fixed an error with edit, change to the updated version and should work fine :D
-::Mr.Dave::-
10-04-2006, 08:55 PM
Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/habboatt/public_html/test/online2.php on line 3
Warning: file(http://www.habbohotel.co.uk/): failed to open stream: Permission denied in /home/habboatt/public_html/test/online2.php on line 3
Current Habbos Online:
i copied the updated script and it didnt work still :(
Are you sure you can use file() on external pages?
-::Mr.Dave::-
10-04-2006, 08:59 PM
thats the updated code he posted and i just copied and pasted it tryed it n it dont work
i now get something really weird showing
well look for yaself
www.habboattic.co.uk/test/online2.php
Mentor
10-04-2006, 09:05 PM
Oops i think that explains it, its grabing the wrong line
(plus must work if the first version worked)
I think... its line 72 of the document, im just not sure if i need to counter for the line 0 in php or not "/
<?php
//get page
$lines = file('http://www.habbohotel.co.uk/');
//Get line
$Ndata = $lines['72']; // may be line 71 or 70 - try till one works :D
//Remove what we dont want
$Ndata = str_replace('<div id="toolbar-habbocount">', '', $Ndata);
$Ndata = str_replace("Habbos online</div>", "", $Ndata);
// Add text and output
echo "Current Habbos Online: ".$Ndata;
?>
-::Mr.Dave::-
10-04-2006, 09:07 PM
still the wrong line now it shows hc badge
Mentor
10-04-2006, 09:13 PM
Can someone else count the lines, as it seems to be changeing "/
Ive got line 73 in a editor with numbers, firefox puts it at 72 and it should be one less to count for the start at 0 "/
Eee. use your current number -2 and it may work *hopes*
ADAM:
10-04-2006, 09:21 PM
Line 72 for me is
<div id="toolbar-habbocount">8,146 Habbos online</div>
Mentor
10-04-2006, 10:08 PM
Yup thats the one its supposed to be targeting "/ so line 71 should be right if php adds a line 0 "/
Or is firefox already adding that and it is 72... meh, im to tired for this
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.