45 users online (1 members and 44 guests)  

Thread: Counter!!!!!


  Results 1 to 4 of 4

Related

  1. looking for a counter    Forum: Website Scripts Forum
    Replies: 3
  2. looking for a counter    Forum: Introduce Yourself
    Replies: 1
  3. Counter Question    Forum: HTML Forum
    Replies: 3
  4. text counter    Forum: HTML Forum
    Replies: 2
  5. hit counter    Forum: HTML Forum
    Replies: 5
  1. #1
    geek987's Avatar
    Man Utd Fans

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    156

    Exclamation Counter!!!!!

    how do i make a counter on my web page(it's in a free hosting web site)? i know it has something to do with telnet, but i can't even connect using telnet!!!!Plz help!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    You have some different options for this. You do not need telnet.

    The easiest is to use a remotely-hosted hit counter. This is a good one -

    http://www3.counter.bloke.com/

    The other option is to use a server-side language embedded in your page to do your counting for you. You can get these at www.hotscripts.com

    here is a simple text counter in PHP -

    PHP Code:
    <?

    //Detects Browser

    if ($HTTP_USER_AGENT) {

    // opens counter file

        
        
            
    $fp fopen (basename($PHP_SELF) . ".counter"a);
            
                
    fwrite ($fp"|");
                
                    
    fclose($fp);
            
    //opens logfile for ip logging
            
        
    $output "<tr><td align=\"center\" bgcolor=\"#dddddd\">$REMOTE_ADDR</td><td align=\"center\" bgcolor=\"#ffffff\">$HTTP_REFERER</td><td align=\"center\" bgcolor=\"#dddddd\">$HTTP_USER_AGENT</td></tr>\n";
        
        
    $fp fopen ("loglist.file"'a');
            
    fwrite($fp$output);
            
    fclose($fp);
        }

    // Counts logfile size
        
    $number filesize(basename($PHP_SELF) . ".counter");

        
    ?>
        
    <div style="background-color: black; font: bold 12pt tahoma; padding: 5px; width: 100px; color: white;">

    <?

    // Displays logfile size
    print($number);


    ?>

    </div>
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    geek987's Avatar
    Man Utd Fans

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    156

    Unhappy

    well, i'm kinda stupid. so , first of all, i tried ur first link. it uses "applets" which my "computer" doesn't support(i'm using IE 6.0 AND Explorer2002 but for some reason, every time i c an applet, all i c is a rectangle with nothing in it, but before(dat's a few monthes ago), i could see the applet itself--strange, huh?) . So, i tried your second link and found the script's "description" i wanted, but i don't know how to download it or copy it or watever you do with it! plz help!!!and for the script you gave me, do i just put it inside a html file, or php file(wat ever dat is?!)OR: do watever i've to do with it!?


    by the way, can you also teach me how to make a public page stats thing?is it similar to counter?
    Last edited by geek987; 07-15-2002 at 11:11 AM.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Allo again mate.
    i think the best route for you is still 'remotely hosted' counters.

    There is a really good (non-Java) hit counter here -

    http://www.dcount.net/

    You just signup, then get your copy&paste code and you are sorted.

    it uses JavaScript, not applets, so it should be okay for you.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread