Dynamic page hit counter system - Need advice...
Posted: Sat Jan 01, 2005 7:00 pm
Hi all
I want to offer my members page hit counters for their pages. I have not started because I am not exactly sure of how to go about it yet. I have built several counters before, but not for something like this. Let me tell you how it will be used first.
Every member has his own folder that is created on member signup. The folder name is a generated id. Currently, my members can create/update/delete pages in their folder. What I would like to do, is offer an option to add/remove a hit counter for the pages they have or create. I also need to use an image based counter to display hits on their pages.
What is the best way to do this? If I do database... the size can become huge. I was thinking to use text files that are created based on the file name of the pages they create. But that sounds like it is going to be very complex.
Here is somewhat of a structure...
User sign up: main folder generated + an images folder is created inside for their images
mysite.com/my_members/member_folder_id/(their pages and images folder here)
user created pages:
mysite.com/my_members/member_folder_id/filename.php
mysite.com/my_members/member_folder_id/filename2.php
mysite.com/my_members/member_folder_id/filename3.php
The pages are created and updated using a form page that includes a wysiwyg editor. To create, they enter a filename, create their content, and submit. The files are all created with php extension, but they are not directly accessible to the public. They are basically used to store created content. The main purpose of the files is for the users to be able to copy the html they created whenever they need it, so they can paste into their own sites and so on.
So I think I would need to generate the counter text files based on filename and create the path to enter the image tag into their html.
So this is where I am stuck. I could skip this whole counter thing, but I would really like to offer it. And the counter would need to be addable, deleteable, and resetable... I know... I'm in for a long journey.
So if anyone could help me out in any way... Please do...
Thank you in advance, and Happy New Year!
I want to offer my members page hit counters for their pages. I have not started because I am not exactly sure of how to go about it yet. I have built several counters before, but not for something like this. Let me tell you how it will be used first.
Every member has his own folder that is created on member signup. The folder name is a generated id. Currently, my members can create/update/delete pages in their folder. What I would like to do, is offer an option to add/remove a hit counter for the pages they have or create. I also need to use an image based counter to display hits on their pages.
What is the best way to do this? If I do database... the size can become huge. I was thinking to use text files that are created based on the file name of the pages they create. But that sounds like it is going to be very complex.
Here is somewhat of a structure...
User sign up: main folder generated + an images folder is created inside for their images
mysite.com/my_members/member_folder_id/(their pages and images folder here)
user created pages:
mysite.com/my_members/member_folder_id/filename.php
mysite.com/my_members/member_folder_id/filename2.php
mysite.com/my_members/member_folder_id/filename3.php
The pages are created and updated using a form page that includes a wysiwyg editor. To create, they enter a filename, create their content, and submit. The files are all created with php extension, but they are not directly accessible to the public. They are basically used to store created content. The main purpose of the files is for the users to be able to copy the html they created whenever they need it, so they can paste into their own sites and so on.
So I think I would need to generate the counter text files based on filename and create the path to enter the image tag into their html.
So this is where I am stuck. I could skip this whole counter thing, but I would really like to offer it. And the counter would need to be addable, deleteable, and resetable... I know... I'm in for a long journey.
So if anyone could help me out in any way... Please do...
Thank you in advance, and Happy New Year!