Author: Jason Olson
Updated on: 2021-02-23
Posted on: 2021-02-23
Viewers: 286 (February 2021)
Package: PHP Redirect to Page Class
Read this short tutorial article to learn how to achieve this in a simple way to another
Tracking Clicks on Links to External Sites
For a recent project, one of the design specification requirements was to have all outbound links go through a sub-domain page before the user browser was actually redirected to their final destination.
This sort of semi-transparent redirect is seen all over the Internet. If you use a bulk email newsletter solution, you maybe familiar with this. Links inside of your email are translated into a unique URL, so the clicks on those links can be tracked.
Hiding the URL of Link Origin Pages
In other cases, it can be used to help hiding the actual destination site domain. In the past this was considered to be a more desired possibility because you could not want to let the external sites to discover the actual original URL of pages that were visited before the links were clicked, especially if it was from some internal domain or intranet or Web mail application.
However, nowadays virtually every site are accessed using encryption with HTTPS, the origin URL is already not fully disclosed. In any case, if you are using private domain names that are internal to the company or organization that you work for, this may be a desirable possibility.
How to Implement Controlled Link Clicking using the PHP Redirect to Page Class
I have written the PHP Redirect to Page Class to help controlling how to handle clicks on links that lead to external pages.
This class comes with full documentation and example code to help you implement it.
You can use it by either downloading its package files archive, install it with PHP Composer using instructions that you can follow in this page.
If you have questions regarding the use of this package, I am fully available through the support forum to help get you started.
You need to be a registered user or login to post a comment
1,573,517 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
Comments:
No comments were submitted yet.