Link click detection?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce W...1

    Link click detection?

    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.

    Thanks for your help.
  • Daniel Tryba

    #2
    Re: Link click detection?

    Bruce W...1 <bruce@nodirect email.com> wrote:[color=blue]
    > 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.[/color]

    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("Locatio n: {$_GET['url']}");
    ?>

    BTW don't forget to urlencode the actual url.

    --

    Daniel Tryba

    Comment

    Working...