Results 1 to 5 of 5
  1. #1

    Default Hits Today Script [REQ]

    Does anyone have or know where to get a script that displays how many hits have been that day?

  2. #2
    Join Date
    Jul 2007
    Location
    Swindon
    Posts
    990
    Tokens
    125

    Default

    theres a php one on techtuts,
    ill update this post if i find the link
    http://www.techtuts.com/forums/index.php?showtopic=29
    Last edited by Eccentric; 20-09-2007 at 03:36 PM.

  3. #3
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    Quote Originally Posted by Eccentric View Post
    theres a php one on techtuts,
    ill update this post if i find the link
    http://www.techtuts.com/forums/index.php?showtopic=29
    oo, i've also bene looking for this, thanks

  4. #4
    Join Date
    Jul 2007
    Location
    Swindon
    Posts
    990
    Tokens
    125

    Default

    Thats ok nd ppl say techtuts suck :S

  5. #5
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    I know there's already been one posted, but, I was bored, so I coded this;
    PHP Code:
    <?php
    $hits 
    file("hits_today.txt");

    $hits[0] ++;
    $fopen fopen($hits "w");
    fputs($fopen "$hits[0]");
    fclose($fp);
    echo(
    "Hits Today: ");
    echo 
    $hits[0];

    $date date(H);
    if(
    $date 23) {
    $fopen fopen($hits "w");
    fputs($fopen " ");
    fclose($fp);
    }
    ?>
    Then make a .txt called hits_today.txt

    (I think there's an easier way of emptying a file's contents, but I can't remember)
    Last edited by lolwut; 26-09-2007 at 05:07 PM.
    i've been here for over 8 years and i don't know why

Posting Permissions

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