TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-10-2007, 04:16 PM   #1 (permalink)
The Visitor
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
truggler is on a distinguished road
Default Stat System

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

Alex
truggler is offline  
Reply With Quote
Old 04-10-2007, 06:40 PM   #2 (permalink)
The Contributor
 
Join Date: Mar 2005
Posts: 81
Thanks: 0
AlEast is on a distinguished road
Default

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.
__________________
NEWEDGE Services, Inc. - Developers of ClientExec
AlEast is offline  
Reply With Quote
Old 04-10-2007, 07:39 PM   #3 (permalink)
The Visitor
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
truggler is on a distinguished road
Default

cool idea,
but how would i differentiate between each user?
Alex
truggler is offline  
Reply With Quote
Old 04-11-2007, 01:47 PM   #4 (permalink)
The Contributor
 
Join Date: Mar 2005
Posts: 81
Thanks: 0
AlEast is on a distinguished road
Default

The referrer I would imagine would be unique for each of your customers.

domain1
domain2
domain3

but if not I'm sure you could pass an id to the img src
__________________
NEWEDGE Services, Inc. - Developers of ClientExec
AlEast is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:20 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design