Hello, I'm setting up some affiliate links on a website. Lets say the product I am selling is netflix. I want to do a few things. I want my affiliate link hidden, so I'd like the link in the status bar to say www.netflix.com when you hover over a link. When you look at the source of the page the links actually say <a href="www.netflix.com>, so you cant tell what the link is by looking at the code. When clicking the link, it opens in a new tab/window and the location bar says http://www.netflix.com Can anyone tell me how to accomplish this? I'm thinking its a combination of using frames and links stored in a database, but I'm not sure. Thanks for any help.
Hi, Here is the code for that : === Javascript function ===== <script> //configure status message to show var statusmsg="" function hidestatus(){ window.status=statusmsg return true } </script> === End Javascript function ==== Use of javascript function : <a href="http://www.smartknight.com" onMouseover="return hidestatus()">Working</a> Thanks
But with JavaScript, they are going to be able to look at the source of the page and see the real links, right? I have a competitor, that when you look at his site, it looks like hes reviewing a product and that the link goes right to the manufactorers page, but, its an affiliate site, hes paying for PPC and it at top spots. So hes making it somehow, and I'd assume its PHP. Anymore ideas?
you may use seperate php file for redirecting redirect.php <?php $link = base64_decode($_REQUEST["link"]); header("location:".$link); ?> PHP: for your links <a href="redirect.php?link=<?=base64_encode('http://www.netflix.com');?>"> PHP:
You can no longer change status bar messages with JavaScript in IE7 with default settings ... best to use redirect as above from wikipedia:
I don't want to use PHP redirects. I want an link to be inextinguishable from a normal link. If you look at http://www.consumerpricewatch.net/ and look at his top diet pills, all of them appear to link to the manufacturer, but they are all affiliate links. So I know it can be done, and I'm hoping someone reading this will know too and share.
You already have the clues to what is going on here. There is no mystical scripting going on in the background. One statement stands out "it looks like he's reviewing a product". And yes, the link goes right to the manufacturer's page. And why? It is a paid review, and the receiving site is tracking referrals from the linking page. The programming is on the other end, in other words. It is possible that tracking is monitored by a third-party also. Either way, it all looks normal in the actual content of the page. If you want to PM me with the particulars, I will check into it further for you.
i would creat a database with these links in and pull the by a post/get call into another php file called redir or summat that way in your header a can chage location in the redir and the user only ever sees .php?id=3 etc this is the long way but the easist for me....