1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Simple visitor count via mod_rewrite?

Discussion in 'Apache' started by squoshed, May 19, 2014.

  1. #1
    Is there a way of doing a simple visitor count, ideally by incrementing a number in a text file...

    eg: http://mysite.org/?ref=client1
    would increment a number in text file 'client1', and still display http://mysite.org as normal?
     
    squoshed, May 19, 2014 IP
  2. Tier_net

    Tier_net Active Member

    Messages:
    35
    Likes Received:
    5
    Best Answers:
    3
    Trophy Points:
    58
    #2
    If you use mod_rewrite, you could have all requests redirect to a PHP script (or any other script), which would increase the txt file counter and then pass the request through to the page you want. Here is a link to a simple counter script:

    http://www.stevedawson.com/scripts/text-counter.php
     
    Tier_net, May 20, 2014 IP