You are here: Re: Finding out who clicked on my link « All PHP « IT news, forums, messages
Re: Finding out who clicked on my link

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация