I have strange requirement and I am not able to find dour whether it is feasible or not. Business wants to know outgoing activity from user. like from our website, where user goes out?
For example: user comes on my website (source): www.DummyTest123.com. After 5 mins of surfing, he goes out to (destination) www.Google.com or www.AnyOtherWebite.com.
How do I know can capture ( www.Google.com or www.AnyOtherWebite.com.) in my Database.
What are the classes or methods available in php to accomplish above requirement?
PS: http_referer will not work as in that , my website is destination.
Thanks
If you have outgoing links on your site to those places, you can change them to point to a page on your site that logs where they're going then redirects them to their destination.
Other than that - nope. That information isn't provided to you in any way.
It is not possible to check what website are people visited after they left yours unless they actually click on the link which is located on your website, and then get redirected.
This is only somewhat possible, and most likely not a great idea to implement. To answer your question, though, you could potentially have an outbound route on your site in which you direct all outbound links to:
http://www.yourdomain.com/outbound?r=www.google.com
There you can log the outbound activity to your hearts content.
There are, however, at least a couple drawbacks.
Keep in mind, that this does nothing to log users who go up to the URL bar and physically type in a different URL, or open a new tab then close the one with your site.