On my upcoming site I am going to try something new, but I am unsure about how to go about laying it out and programming it. I am looking for some help here and methods to be listed...
I want to have a system where I give out a script to my users, this script counts pageviews and returns it (with site id) to my MySQL database, where I will then rank there site amognst others to produce a top ten and low ten.
I was thinking about an include(); but this would make it easy for my members to get my database credentails and therefore edit there count / or hackers could get in this way.
My basic principal is this:
> Script given to user with site id on it (this is the script i need help with)
> Script then gets site id and +1 to their pageview count
You could do what some systems do and use an image that is dynamically generated on your server. a normal <img src="someuri/image.jpg"> you have to on your side tell your server that for that image.jpg process some code. You will have the domain that called it so you don't really need to pass the siteid. And you can generate the image ( load it from file ) and echo it out. They see the image on their side, but you process the information how you wish.
but how would i differentiate between each user?
The referrer I would imagine would be unique for each of your customers.
but if not I'm sure you could pass an id to the img src
|All times are GMT. The time now is 01:54 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0