Jump to content

Cloaking Affiliate Links


light87

Recommended Posts

I have a Website that has several affiliate links that I would like to cloak.  More specifically, when a user clicks on

one of the links, I would like the Web Browser to reveal a URL that does not have "affiliate" in the name.  My

Website is http://www.website-kept-private.com, which is a fictitious Website (I have kept the true name of the Website private to keep in accordance with the terms of this forum).  I wish to use PHP coding

to employ a link (not an entire page or Website) redirect on one of the pages.

 

 

 

<p>This is a great opportunity, <a href="http://www.website-kept-private.com/recommends/software-mobile/index.php">so forth and so on</a></p>

 

 

Obviously, I created two sub-directories in the Website:

 

The 1st is "recommends", and the 2nd is "software-mobile".  The file "index.php" is placed under the "software-mobile" sub-directory.

 

The entire coding for "index.php" is:

 

 

 

<?php

header("Location: http://Affiliatexyz123.Product-To-Sell.hop.clickbank.net/");

exit;

?>

 

Of course, Affiliatexyz123 is a fictitious Affiliate I.D.

Of course, Product-To-Sell is a fictitious product.

 

 

 

 

 

This shows up on the bottom when you mouse over either the link or the picture:

 

http://www.website-kept-private.com/recommends/software-mobile/index.php

 

 

This shows up in the URL address when you click on the link or the icon:

 

http://Product-To-Sell.com/?hop=Affiliatexyz123

 

 

The goal is that when the user clicks on the link, that "http://www.website-kept-private.com/recommends/software-mobile" shows up in the URL address, instead of revealing the Affiliate I.D. (which is Affiliatexyz123).

 

Unfortunately, it doesn't.

 

I have Linux hosting through GoDaddy.  It seems as though GoDaddy only supports entire page redirects or entire Website redirects. 

Maybe I'm wrong.  If GoDaddy does not support single link redirects, who does?

 

 

 

I would appreciate the help.

Link to comment
https://forums.phpfreaks.com/topic/203599-cloaking-affiliate-links/
Share on other sites

Hello:

 

I thought that use of Iframes blocks google and other entities from crawling your site.  I forgot to mention that I have several different links that sell different products from different Websites.  Buying a new Domain name is not an option if you want to sell more than one product on each page, and the links go to different Websites.

 

I would appreciate the help.

 

 

simply declare meta tags

<html>
<head>
<title>My site name</title>
<meta name="description" value="som discription">
<meta nam="keywords" value="apple,oranges">
</head>
<frameset rows="100%" border="0">
<frame noresize="noresize" src="http://some-affilitat.com/?code=45>
<noframes>
<body>Sorry your browser does not support frames</body>
</noframes>
</frameset>
</html>

 

meta tags will make your page accessable to google , all you need to do is change src attribute of frame tag using php and then throw the output to the client. and the best part you dnt even need to purchase domain if you can implement all this properly .

by php I mean programatic (automated) , you will need to create a table (url) in database with columns public url , and real url ,

every public url will have real url assosicated to it ( 1 to 1 relationship) , here real url = your affilate url which you want to hide, you will show public url e.g http://yoursite.com/magic.php?public_url = 12345

when user click on this url , you will do select real_url from url where public_url = 12345 , , now store the real_url , in $real_url

 

return

 

<html>
<head>
<title>My site name</title>
<meta name="description" value="som discription">
<meta nam="keywords" value="apple,oranges">
</head>
<frameset rows="100%" border="0">
<frame noresize="noresize" src="<?php echo $real_url ?>">       // <=====
<noframes>
<body>Sorry your browser does not support frames</body>
</noframes>
</frameset>
</html>

 

 

 

 

This will not work, since my Website uses the "Strict" DTD (Document Type Declaration).

 

I found out that if you are using Strict for the DTD, then frames or iframes are not allowed.

 

The reference for this is: See "Head First HTML with CSS & HTML" by O'Reilly Books, page 642

 

"The frameset DOCTYPE's are considered to be transitional, so you can't have frames and be strict."

 

There has to be another way.

 

Thank you.

 

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.