![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New Coder ![]() Join Date: Nov 2005
Posts: 58
Thanks: 1
Thanked 0 Times in 0 Posts
![]() |
Simple Question About Checking Whether a user click on a link or not
Yes, I'm making a website and what I need to know is about a simple script that would see if a user clicked on 5 or more affiliate banners/ads given. Once the user has clicked 5 or more, a button would appear, and once you click on that, an email would be sent to me.
Anyone know? |
|
|
|
|
|
PM User | #2 |
|
Senior Coder ![]() Join Date: Jul 2002
Location: Vancouver, BC Canada
Posts: 1,198
Thanks: 26
Thanked 70 Times in 70 Posts
![]() |
I would direct all banner clicks to a second file,which then redirects to the advertiser. Use sessions or cookies to keep track of how many times advertiser.php loads during their visit. The syntax below may be incorrect, but it should give you a starting point.
PHP Code:
PHP Code:
__________________
Leonard Whistler Last edited by Len Whistler; 09-23-2007 at 01:37 AM.. |
|
|
|
|
|
PM User | #3 |
|
Senior Coder ![]() Join Date: Apr 2003
Location: in my house
Posts: 4,842
Thanks: 37
Thanked 167 Times in 163 Posts
![]() ![]() |
I agree with using sessins but, after the five visits have been reached maybe you could use a conditional to run a sub, whihc emails you. That should save the errors from poeple who don't want to click.
bazz |
|
|
|
|
|
PM User | #6 |
|
Senior Coder ![]() Join Date: Jul 2002
Location: Vancouver, BC Canada
Posts: 1,198
Thanks: 26
Thanked 70 Times in 70 Posts
![]() |
I assume these "affiliate banners/ads" are external URL links? Or are they internal links? Or do you just want to count the clicks on banners that doesn't take you anywhere?
Keeping track of 100 different clicks will be a big coding job, I recommend PHP and a MySQL database.
__________________
Leonard Whistler |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|