The Little Guy Posted January 6, 2009 Share Posted January 6, 2009 I want to have a links on certain pages that go to an external page, (http://google.com) to have that in the href, but when the user clicks on it, it takes them to a page such as: urlCount.php and does some sort of counting then redirects them to the URL they selected. How can I do that? <a href="http://www.google.com">Google</a> When the user clicks on that, I would like to redirect that user to: urlCount.php without them really knowing. I hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/139617-url-redirect/ Share on other sites More sharing options...
corbin Posted January 9, 2009 Share Posted January 9, 2009 Doesn't sound like being able to do that would be safe to me.... Just send them to out.php?linkid=1 or something. If they want to go to the link, they'll click on it ;p. Or, you could do some AJAX magic to store it. (Would probably have to open it in a new window though, or the AJAX request might get canceled.) As far as I know, there's no way to make a fake link. There might be some JS magic to override the status bar text (used to work in the day, but I think most browsers now don't allow it), but besides that.... Quote Link to comment https://forums.phpfreaks.com/topic/139617-url-redirect/#findComment-733730 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.