alwaysvaghu Posted November 29, 2005 Share Posted November 29, 2005 HEllo FrndsHow To Put Hit Counter on Perticular page..????so plz give me suggestion if u have..i dont know even in which language it will be easier or how to do that? Link to comment Share on other sites More sharing options...
real_illusions Posted November 29, 2005 Share Posted November 29, 2005 i believe its javascript thats used for page counters.i usually search the internet for free javascript. had a quick look but cant find any page counters..but i'm sure i saw one somewhere. Link to comment Share on other sites More sharing options...
Skemcin Posted November 29, 2005 Share Posted November 29, 2005 Well, javascript might be the language that is used, but it alone will not be able to provide a solution. It is only a client-side language so it will not be able to store anything cumulative for a website without interacting with something else.I'm not a fan of hit counters since they really don't fairly represent site traffic and they can be easily manipulated to produce inaccurate results. But, if you insist on having one just google "free hit counters" and you'll be inondated with plenty of options.If you're hosting provider doesnot offer web statistics, then consider this tool:http://pphlogger.phpee.com/its a great little tool I've used in the past.Good Luck Link to comment Share on other sites More sharing options...
scott100 Posted November 29, 2005 Share Posted November 29, 2005 Skemcin is right you won't be able to produce a hit counter with javascript as this is a client-side language and has no way of saving information that you can access.You would need to use a server-side language like php for example and link it to a file or databases that adds 1 to a variable each time the page is requested. Link to comment Share on other sites More sharing options...
aspnetguy Posted November 29, 2005 Share Posted November 29, 2005 I don't see how you can even use javascript at all, it can't talk to a databse or anything.You need a database and a server side language like ASP.Net or php.I agree that counters can be easily manipulated, if they are written wrong! They should only log unique visitors (ipaddress) and not muliple hits to the same page, by the same user, every couple minutes. Link to comment Share on other sites More sharing options...
real_illusions Posted November 29, 2005 Share Posted November 29, 2005 maybe i got confused with a javascript that created a fake hit counter.sorry... Link to comment Share on other sites More sharing options...
Skemcin Posted November 29, 2005 Share Posted November 29, 2005 well, javascript is used in conjunction with many hit counters. javascript, since it is loaded client side, can execute when the page loads and call an external script(php, asp, or cold fusion) that runs on a remote server. All the magic is done in that remote file that the javascript calls. This, infact, is what pphlogger does. It passes the counter account id to the php page (via javascript) and then based on that call, the php code extracts everything it can and databases it. It is optional, in pphlogger, to display the counter.All in all, its as I stated before, javascript CAN be used for a hit counter but it CANNOT do it all alone. Adding to that, as real_illusions points out, you could (for what ever reason) create a fake hit counter with javascript. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now