Counting Script

Discussion in 'JavaScript' started by dtm32236, Oct 22, 2008.

  1. #1
    Hey guys,

    I've been searching Google for this for wayyy too long now, and I can't find anything (probably searching the wrong terms).

    I'd like to add a counter on my site that simply reads a number from a text file (or any file - it can even be embedded in the script itself).

    I'm looking for something like this (right under the header links, the "total donations" thing):
    http://www.kintera.org/FAF/home/defa...?ievent=268675

    Every search comes up with a Website Hit Counter (not what I'm looking for).

    I don't care if it's written in JavaScript, PHP or CGI. It doesn't really matter. I'd imagine that it's a pretty simple script, but I'm too dumb to write it myself.

    Does anyone know where I can find something like this? Thanks a lot for any help!
     
    dtm32236, Oct 22, 2008 IP
  2. dtm32236

    dtm32236 Guest

    Messages:
    320
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    sorry - here's the correct link (i hope)
     
    dtm32236, Oct 22, 2008 IP
  3. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <?php
    echo file_get_contents('counter.txt');
    ?>
    PHP:
     
    MMJ, Oct 22, 2008 IP
  4. dtm32236

    dtm32236 Guest

    Messages:
    320
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks a lot, MMJ. I was really looking for the way the thing tics, or scrolls, like it does on that page. But I figured it out.

    Thanks for the help!
     
    dtm32236, Oct 22, 2008 IP