Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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