This tutorial is simple, but very effective. It will count the unique hits per day and keep a permanent record. I will first explain how it works, and then I will go ahead and give you the code.
First we set up a database and put a chunk of code at the top of every page. This code will catch the users IP and write it to the database along with the date. However, when it goes to write the IP, it first searches for the IP to see if it has already visited the site, but it will only search that day. If the IP has already visited that day, it will not record it again. For example, if IP 123.456 visited on 02/04/00 it will record it, then if that IP visits again on 04/04/00 it will again record it, but if the visit twice on 02/04/00 it will not record the second time.
Let’s set up the database. Run this SQL script on whatever database you want, its not particularly large.
Now put this code at the top of every page you wish to record the hits from. This tutorial will not record hits for individual pages but will consider every page as a whole. So if they visit 2 pages that have the code in the same day it will record the IP once.
Ok, now we need to display the amount of hits. I will give you 2 options, one is displaying the hits from that day. That means it will go back to 0 everyday or you can display total unique hits recorded, not including double IP records on separate days. So in other words it will display the amount of IP’s that have viewed your site since you installed the script.
This code will display the daily hits.
This code will display the total IP’s.
If you know MySQL feel free to play around with this and display results as you wish, eg by month, year, etc.
Hope you enjoyed this tutorial, pretty simple, but effective.
This tutorial teaches how to make a picture of anyone into a very detailed vector image, with as much details as you feel. Using classic rhotoscoping techniques you can make a cartoon version of you’re own photographs with as much or as little detail as you feel patient enough to put in.
Difficulty: Easy-Moderate
Time: 1-2 hours
Read More…
Welcome to the final part of this long tutorial. By now you should have your admin panel up, but not all working, that’s ok. Once we have finished this section it will all be running fine. Every page made in this section will be put into the root folder you were asked to choose in section 1. I will try to explain this section with a fair amount of detail so that everything you have made will start to make sense. I hope you have made records in the category and tutorials table otherwise this section will be a lot more confusing then needed.
Read More…
Welcome to part 4 of this 5 part tutorial. This section will handle the comment system that allows users to port what they think about the tutorial you have posted. Unlike the last 2 sections of this tutorial, this one will not need an add page in the admin panel because all the comment adding will be done from the tutorial page. This section will be useless until you have completed part 5, so don’t worry if things aren’t working just yet. Every page we create in this section will go into the admin folder.
Read More…
Welcome to Part 3 of this 5 part tutorial on making a complete Tutorial Management System. This is probably the most important section of the 5 because it is dealing with managing the tutorials themselves. Every page we create in this section will go into the admin folder.
Read More…
Welcome to the second part of the 5 section tutorial on how to create a Tutorial Management system. This section we will be looking at managing the categories for your tutorials. We will be working only in the admin folder that we set up in Part 1, so there is no need to use any other folder. Every page we create in this section will go into the admin folder.
Read More…
Welcome to the 5 part, in depth tutorial on making a complete tutorial management system. This is the first of the five part tutorial. Please make sure you remember that none of the parts of this tutorial will work on their own, but together they will work like a charm.
Read More…
