Link click detection?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-28-2003
Bruce W...1
 
Posts: n/a
Default 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.
Reply With Quote
  #2 (permalink)  
Old 10-28-2003
Daniel Tryba
 
Posts: n/a
Default Re: Link click detection?

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

Reply With Quote
Reply
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

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




All times are GMT +1. The time now is 06:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0