From the information collected above, we can divide the data into three main specific information areas: Website Info: How many visitors, browsers used, and pages visited. Visitor Info: Pages visited, browsers used, and date of visit. Page Info : Who visited a particular page, how many times, when and browser used. To get this information all we have to do is run some very specific SQL queries: Website Specific Analysis To count how many people visited the site, run the following code: $query = "SELECT COUNT(*) FROM stattracker GROUP by ip"; This will count all the different IP addresses in the table. If one person with the same IP address views this site a hundred times, the result of this query will be one; the same thing happens if the person views this site two hundred times. Number of times a particular browser has been used to visit the site: $query = "SELECT *,count(*) FROM stattracker GROUP by browser"; The above query checks how many time a particular browser has been used to visit the site.
blog comments powered by Disqus |