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
Redirecting from hyperlinks
Moderator: General Moderators
Re: Redirecting from hyperlinks
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.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
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.