Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Webpage hit counters

    Hi everyone,

    My name is Michelle. I am currently learning JavaScript (I'm very new to it). I've learnt html but not xhtml.

    Anyway my question is :

    Can website hit counters be built with JavaScript? I really want one for my homepage but don't want the free ones that have advertising etc.

    Does anyone have the code for it that I could use?
    I would really appreciate it.

    Thanks
    Michelle

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No crossposting!

    Please observe the forum rules: no crossposting.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    Michelle ...

    I'll reply here instead of the Javascript section because I think your
    question goes here. It can't be done with Javascripting.

    With Javascripting, the only thing that can be saved is cookies ... and that
    would be on the visitor's PC, not your webhost diskspace.

    You need to use a server-side language such as PHP or Perl. It would be
    a good learning experience to look into and and try your hand at it ...

    but, hit counters really don't mean anything anyhow ... nobody really cares,
    or believes the number they see. You should try to do something else with
    Javascripting. Maybe learning how to use cookies might be a nice thing
    to know.

    Do a search on Google for: Javascript Cookies Tutorial

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Search

    Although mlseim basically covered it, here's a thread from the PHP forum that comes close: Link hit counter.

    A page hit counter should be invoked differently, but most of the leg work comes close enough.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •