Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
how would i make a counter to see how many people log onto my page...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314

    page counter


    how would i make a counter to see how many people log onto my page
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    To make a text one, just write a PHP page that retrieves the number from a text file somewhere in your file system, and then increases it by one and stores it.

  3. #3
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314

    what function

    what function writes a file
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jun 2003
    Location
    Helsinki, Finland
    Posts
    78
    Check out the great php documentation for fopen and go from there.

  6. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Are you using a database for your website??

    Regards
    Regards

    Andutt

  7. #6
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    If you are using a database i can show you how to build an easy sitecounter.... in PHP.
    Regards

    Andutt

  8. #7
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314

    sure

    i have access to a data base would that be better

    also i dont really want some one to hit refresh and heve them be counted every time they hit refresh

    i think that would include sessions which i learning about

    correct me if im wrong please
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  9. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    To have page counters use sessions would certainly be great, but it can be misleading as well. You'll have to remember that in that case, it will count visits, not hits, so you'll be looking at a much lower count.

  10. #9
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314
    ok so if i dont use sessions sould the count count higher every time someone presses the refresh button so the count would be much higher than the auctuall number it should be right.
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  11. #10
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Thats correct...if you have an easy pagecounter hitcounter it will be updated everytime the page are being refreshed, but its like Dolda says if you want a hitcounter or a session hitcounter...its quite easy to fix both.

    But its a litte more work to fix a sessionhitcounter.

    Regards
    Regards

    Andutt

Page 1 of 2 1 2 LastLast

Posting Permissions

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