I am creating a directory of websites.
When someone clicks one of the links and leaves my site I would like to be able to record which hyperlink they clicked and when.
The only way I can think of doing it is to have a "hidden" page between the hyperlink on my site and the final destination.
If a user clicks a link it goes first to a hideen page which processes the event, sends the details to a MySQL database and then redirects to the final destination using a meta refresh tag.
Is there any other (neater) approach I could take?
counting clickthroughs
Moderator: General Moderators
-
The Monkey
- Forum Contributor
- Posts: 168
- Joined: Tue Mar 09, 2004 9:05 am
- Location: Arkansas, USA
instead of a meta refresh tag, header("Location: $link"); would make it appear more seamless for your users.
The url can also be a $variable.
Code: Select all
header("Location: http://www.example.com");