Shoutbox

Stats Script - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Stats Script (/showthread.php?tid=46173)

Stats Script by absorbation on 06-12-2005 at 11:36 AM

Ok it's me again on about scripts :S this script is simple but i;m in a rush for it :P

http://www.stuffplug.com has stats
http://www.mpsounds.net has stats

How do they get the stats?

Like how many page views on certain pages, users online (i know this one) how many files in the downloads database etc :S

Can someone tell me how they show this a nd give me the basic script for it :P

Thanks :)


RE: Stats Script by Eljay on 06-12-2005 at 11:42 AM

page views = hit counter
download database = probably just mysql_num_rows() on their download database

just search hotscripts for hit counters and download databases, theres loads


RE: Stats Script by Dempsey on 06-12-2005 at 11:44 AM

ffs learn PHP and stop asking people to code you simple scripts.  If you actually follow some PHP tutorials your see that it isnt actually hard, just try doing it yourself


RE: Stats Script by absorbation on 06-12-2005 at 11:50 AM

quote:
Originally posted by Dempsey
ffs learn PHP and stop asking people to code you simple scripts.  If you actually follow some PHP tutorials your see that it isnt actually hard, just try doing it yourself

meh :$ I will learn php but i sorta need it now :S I knew you two would post first :lol:

Something like lj said would help i can code around that, accept i still need something to work with :p

It is a hit counter but not a big ugly one. One that only shows text would help :S
RE: Stats Script by Eljay on 06-12-2005 at 12:00 PM

omg all you need for a hit counter is a few lines of code really

<?
$counter = fopen("counter.txt", "r");
$blah = fread($counter, filesize("counter.txt"));
fclose($counter);
$counter = fopen("counter.txt", "w");
$blah++;
fwrite($counter, $blah);
fclose($counter);
echo $blah;
?>

may show up an error first time but shouldnt after that


RE: Stats Script by absorbation on 06-12-2005 at 12:03 PM

thanks lj that's what i wanted i'm tryed to show the users browser and ip now :P

Edit: New test http://www.msgstuff.com/test.php
http://www.msgstuff.com/test2.php :P