Results 1 to 5 of 5

Thread: Visitor counter

  1. #1
    Join Date
    Dec 2005
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Visitor counter

    What's going on my home page?
    I have simple visitor counter, but now there's 1.2131214121312E+167 visitors on my site!

    Here's the code I used:
    Code:
    <html>
    <head><title>Taikasilma.com</title>
    <link rel="stylesheet" type="text/css" href="tyylit.css">
    </head>
    <body>
    <?php
    $myfile = "kavijat.txt";
    if(file_exists($myfile))
     {
    	$var = fopen($myfile,'r+');
    	$visits = fgets($var);
    	$visits+=1;
    	fwrite($var, $visits);
    	fclose($var);
     }
    else 
     {
    	print "<span class=\"p\"><b>Tiedostoa $myfile ei 	
    
    l&ouml;ydy...</b></span>";
    	die();
     }
    print "<span class=\"o\">K&auml;vij&ouml;it&auml; t&auml;ll&auml; sivulla: 
    
    $visits</span>";
    ?>
    </body>
    </html>
    So can anyone help?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Haha What does the textfile have in it?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2005
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Inside textfile i had this before counting:


    Code:
    0
    and after counting:

    Code:
    1.2131214121312E+167

  4. #4
    Join Date
    Dec 2005
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I have now 012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.213121412131 2E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214 121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.21 31214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+1 51.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.21312141213 12E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+35012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.213121 4121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2 131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312 151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+320121312141 21312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+3101213 1214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+36 012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.213121412131 2E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214 121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.21 31214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+1 51.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.21312141213 12E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+35012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.213121 4121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2 131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312 151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+320121312141 21312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+3101213 1214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+37 012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.213121412131 2E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214 121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.21 31214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+1 51.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.21312141213 12E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+35012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.213121 4121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2 131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312 151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+320121312141 21312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+3101213 1214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+36 012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.213121412131 2E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214 121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.21 31214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+1 51.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.21312141213 12E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+35012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.213121 4121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2 131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312 151.2131214121312E+151.2131214121312E+34012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+320121312141 21312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+3101213 1214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+38 012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214121312E+32012131214121312151.2131214121312E+151.213121412131 2E+31012131214121312151.2131214121312E+151.2131214121312E+33012131214121312151.2131214121312E+151.2131214121312E+31012131214121312151.2131214121312E+151.2131214 121312E visitors!!!! I have probably most popular site over the Internet!!!
    Last edited by Iiro; 12-22-2005 at 11:32 AM.

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Not sure what is going on in your counter there.... simple is not always better

    However, simple is the key and ease of use too!

    Take a look at this one here: BBclone

    It is 100% free, full of support and options and I have been using it on my site (average 5000 visitors a day) for 3 months with ZERO problems... detailed stats as well as your ordinary counter
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

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