Jump to content

URL Redirect


The Little Guy

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/139617-url-redirect/
Share on other sites

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....

Link to comment
https://forums.phpfreaks.com/topic/139617-url-redirect/#findComment-733730
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.