The simplest counter possible

Hello there,
Could anyone help me I want to make a counter for my page. Is there any way that I can simply make a text file, store it on the server or something and whenever someone hits my page put some information in the text file?
Thanks

Comments

  • : Could anyone help me I want to make a counter for my page. Is there
    : any way that I can simply make a text file, store it on the server
    : or something and whenever someone hits my page put some information
    : in the text file?
    You need a server side language. JavaScript is for client side scripting. You'll find there are plenty of scripts out there for counters already that you can just install, or if you really want to write on learn a language you can use service side, e.g. Perl.

    http://www.cgi-resources.com/ will surely have plenty of counter scripts available. :-)

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • JavaScript is client-side, and it can't access the server in order to modify files on it. You can count the times that individual person has visited if you use a cookie, though.

    http://www.ocdn.fairmount.nu/ - Omnisoft - Quality webmaster scripts and services.

  • Thanks
    Could it be possible though to count how many cookies I distribute (and use that as a counter)? or are there other ways like sending an email to a certain address each time the site is hit?
    Thanks again
  • Counting cookies? No. Sending email? Yes. Make a form, with an action of "mailto:email", and submit it onload. You would have to update the page manually every time though, as Javascript can't read files any more than it can write to them.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories