PHP Tutorials: Unique Visitor Counter (Part 1)


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.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , , , , , ,

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

  1. Sajhu360 says:

    hey php academy, i have been working on subtitles for this video for i while as a school project. subtitles are in spanish and i would love if u could put this subtitules on these videos (unique visitor counter) write me a message please. u only need to upload the subtitles file into the video’s subtitles (in my video options). thanks

  2. Dizy8 says:

    4:43 thats what i need :D

  3. 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);

  4. vb6help says:

    which means you could use cookies, yummy! xD

  5. 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.

  6. phpacademy says:

    I’m a YouTube partner

  7. ekkkkkknoes says:

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

  8. peteusz says:

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

  9. 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

  10. omanoman98 says:

    Nice Video, looking forward to the next one! Thanks

Leave a Reply