FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

counter help

 


akshar
Quote:

can any one tell me simple javascript code for counting hits of the page i know javascript i have just written a function that takes valu and returns it by incrementing but i dont know how to call that function as soon as page loads?
please ,if any one can write code it will be better for me
Roald
Code:
<body onLoad="yourFunctionName()">
Stubru Freak
You can't make a counter in javascript. Everything in javascript is executed in the browser, so the browser can only know how much it visited your page itself, not how much other computers visited the page.
santium
To do this, you'll need something like a PHP hit counter. They're fairly simple to write. You can make it only count unique hits (as in unique IPs) or global hits (all hits, including duplicate IPs).
Roald
Or you could use something like this or search google
motha
your counter in javascript if home made will not work but if you use php using php math and file_get_contents() and file_put_contents().
ritesh26
To maintain live counter you have to required PHP or other server side script to store data. if you can not do this then you should go with this, pre made counter will help you mich better and give each and every information about visitors.
http://cqcounter.com/?_id=ritesh26&_lo=in2
aningbo
there are quite some few, try searching a little but javascripts would use cookies which means it wont count your site visit. think again.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.