Page 1 of 1

Redirecting from hyperlinks

Posted: Wed Mar 15, 2006 9:22 am
by Berbbrown
I would like to record to a database when a hyperlink is clicked on my website and have a couple of questions.

1. What is easiest and most effective way to do this?
2. How can I ensure that the website where the link points to will see that some of their traffic originates from my site?

Can anyone help please?

Many thanks

B

Re: Redirecting from hyperlinks

Posted: Wed Mar 15, 2006 9:27 am
by dave_c00
Berbbrown wrote:I would like to record to a database when a hyperlink is clicked on my website and have a couple of questions.

1. What is easiest and most effective way to do this?
2. How can I ensure that the website where the link points to will see that some of their traffic originates from my site?

Can anyone help please?

Many thanks

B
You can create a .php page that is run from every link on your site with a ?url=http://www.google.co.uk on the end.

When the page is opened it does the relevant query to save the data to a table and then performs a redirect to the $_GET['url'].

The linked website will still see the $_HTTP['REFERER'] as being that new .php page on your site.