This is a discussion on Link click detection? within the PHP Language forums, part of the PHP Programming Forums category; How might one detect if someone clicked on a hyperkink at your website, so it can be logged in a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Bruce W...1 <bruce@nodirectemail.com> wrote:
> How might one detect if someone clicked on a hyperkink at your website, > so it can be logged in a database? This would have to be done before > the browser redirects. The only way you can be sure is to not put any external links on your pages directly, but have them point to a redirect script. That script will take a GET parameter and redirect the browser to the givven url after loggin whatever you might seem fit. redir.php <?php doLogginStuff(); header("Location: {$_GET['url']}"); ?> BTW don't forget to urlencode the actual url. -- Daniel Tryba |