Categorized | PHP

PHP Tutorials: Unique Visitor Counter (Part 1)

Posted on 19 March 2010 by Abidoon


This works in the way that if a user has visited the page before (based on their IP address), their hit will not be counter. If a visitor is new to the page, a hit will be counter and their IP address stored for future checking.

Tags | , , , ,

9 Responses to “PHP Tutorials: Unique Visitor Counter (Part 1)”

  1. Dizy8 says:

    4:43 thats what i need :D

  2. lnorby06 says:

    He don’t even have to use a loop to determine whether an ip already exists in the file.

    Just use this:
    if (in_array($_SERVER['REMOTE_ADDR'],$ip_file)) fwrite($visitornum_new,$file);

  3. vb6help says:

    which means you could use cookies, yummy! xD

  4. gyrgrls says:

    IP logging is not dependable,
    as more and more broadband subscribers
    have dynamic IP addresses, due to the
    dwindling number of available CIDR blocks
    to providers under IPV4.

  5. phpacademy says:

    I’m a YouTube partner

  6. ekkkkkknoes says:

    How you made this “Why not subscribe?” on top your Description?

  7. peteusz says:

    Why didn’t you use foreach instead of for loop? It would save a lot of work…

  8. easygoldmoneyfast says:

    There’s a another good program to make money online is called chattotext and you can use it to get GDI Sign Ups, for more info go to
    easygoldmoneyfast . com
    i just started and i am already making money
    easygoldmoneyfast . com

  9. omanoman98 says:

    Nice Video, looking forward to the next one! Thanks


Leave a Reply