|
Posted by ZeldorBlat on 09/28/66 11:48
Nospam wrote:
> suppose I had a link on my site http://www.example.com/link.html and I
> wanted to find out via diferent SID's who clicked on the click is there a
> php script that can do this?
Create a page on your site that takes the URL as a parameter, records
the user and URL, then redirects the browser. Then, make all the links
on your site point to that page and pass the URL in the URL (that
sounds funny, I know).
Using your example, a link to <http://www.example.com/link.html> would
actually be a link to
<http://www.mysite.com/redirect.php?url=http://www.example.com/link.html>.
Your redirect.php page might look something like this:
<?
$url = $_GET['url'];
//record the fact that the user clicked on the link for $url
header("Location: $url"); //redirect the browser
?>
Of course, I'll leave the details (like properly encoding and decoding
the url and validating the parameter) up to you.
Navigation:
[Reply to this message]
|