How To Create a Hit Counter - Page Views (PHP) Part 2 of 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,722
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 6, 2010

http://www.helpvid.net/tutorials/dreamweaver/create-a-php-hit-counter-2.php
http://seoninjaforum.com/
How To Create a Hit Counter - Page Views (PHP)

In this tutorial we create a hit counter for our website, this hit counter can be used too ad total from your website or for individual page views, allowing you to track the popularity of particular pages within your website.
This hit counter will be a flat base PHP script, there will be no need for any Mysql databases. You have the option to follow along to the tutorial or you can download the file from the link above.
The PHP code should be placed into the body of your html, into the location where you want the hit counter to appear. Its also important you have a [hitcounter.txt] file located in each folder that has PHP files using the PHP script.


For After Effects Video Please visit
http://www.youtube.com/user/BirdKid8

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • i am having a problem placing this code into my html page. the gold php icon is displayed but i don't see it on website when i visit it!!

  • this is misleading people !! its better to use MYSQL DB as a view counter it will save time.

  • @SlightlyAmiss When you're right you're right..:)

  • @CINEMA35mediafilms Correct. But manually making a new text file for every page you need is a lot of work that is not needed. I was simply commenting to let viewers know what they're getting, because how it's described in the video is misleading.

    In any case, I would advise someone to learn rudimentary MySQL and play around connecting and inserting info into a database. That's how I solved my concern when non of these YouTube tutorials could help.

  • @SlightlyAmiss You can easy modify the script and add a folder named counters. Just make more txt files named in a different way for different pages and put them all in that folder. Then all you have to do...it's to add the php code to where you want it to apear and just change the first line as example define("HITCOUNT", "counters/productshitcount.txt­"); instead of hitcount.txt. and there you go....you can have as many counters as you want.

  • Helpful step by steps, but this is *not* a per page counter. It is a per *directory* counter.

    You cannot copy this code to each page in a directory and get unique counts. Please be more clear when describing what's happening in your videos.

  • wow i have found ur websites very helpfull mate cheers so much

    im studing computer engineering in edinburgh, but like to learn how to do things like this .

  • Great video!

    This Helped me out alot with my websites! Thanks =D

  • I've only use this at school making a basic webpage with a image. Great video. I don't know why you don't get many views and commets. Whats up with that? Oh well. :D Good luck with your account and website.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more