2 Cloaking Methods

Status
Not open for further replies.

Heartcore

Banned
Feb 13, 2007
82
4
0
Belgium
Cloaking your affiliate links is usefull for a few things. The most important being that people can't type the URL into their browser and second some people just refuse clicking affiliate links. Here are 2 ways to cloak your affiliate links.

Method One

This is a redirection script which can hold an unlimited amount of URLs, and it allows you to keep them all into one PHP-file. Okay, here we go.

1. Create a .php file, call it redirect.php

2. Open the file and insert the following code :

$links = array(
"samsys" => "http://www.samsys.com",
);
header("Location:".$links[$_GET['site']]);
exit;
?>

Offcourse you need to replace the description and URL with whatever you want, also note that you can add as many URLs below this one as you want.

3.Call the link using this string :


You're done!



Method Two

This method can be used to redirect single affiliate links, the advantage with this method is that if you have enough links to the affiliate link you could get it to rank in MSN, so those are potential earnings from organic searches.


So, you want to have a file to redirect to one of your sites? Easy!

1. Create a file called mysite.php

2. Open the file and insert the following code :

header( 'Location: http://www.mysite.com' ) ;
?>

3.To call the link simply use:


This method makes the link look much more like a static page, so the visitor is more likely to click your link.


Well, we're done!
 


Good post Heartcore. I use those methods as well.

Two other methods I have used are...301 redirects in .htaccess and javascript redirects.
 
Just wanted to throw in another that was posted on DP a while back that I use from time to time and found very useful. Note: This script checks for SE bots and will not let them follow the links, instead it will redirect them to a blank page.

Call this file jump.php or redirect.php whatever you would like

<?
function check_search_engine() {
if ($a == 1) {
header("Location: http://www.affiliate.com/link.php");
exit;
}
{
IF(!isset($_SERVER['HTTP_USER_AGENT']))
{
$user_agent = '';
}
ELSE
{
$user_agent = $_SERVER['HTTP_USER_AGENT'];
}

$search_engines[] = 'Fast';
$search_engines[] = 'Slurp';
$search_engines[] = 'Ink';
$search_engines[] = 'Atomz';
$search_engines[] = 'Scooter';
$search_engines[] = 'Crawler';
$search_engines[] = 'bot';
$search_engines[] = 'Genius';
$search_engines[] = 'AbachoBOT';
$search_engines[] = 'AESOP_com_SpiderMan';
$search_engines[] = 'ia_archiver';
$search_engines[] = 'Googlebot';
$search_engines[] = 'UltraSeek';
$search_engines[] = 'Google';

foreach ($search_engines as $key => $value)
{
IF($user_agent != '')
{
if(strstr($user_agent, $value))
{
$is_search_engine = 1;
}
}
}

IF(isset($is_search_engine))
{
return TRUE;
}
else
{
return FALSE;
}
}
}
?>
<?
if (check_search_engine() == TRUE) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
</body>
</html>
<?
} else {
$a = $_REQUEST['a'];
if ($a == 1) {
header("Location: http://x.azjmp.com/091Cs");
exit;
}
elseif ($a == 2) {
header("Location: http://yourdomain.com/blahblah");
exit;
}
}
?>
You can add as many as you want by simply copying the elseif, upping the number by one and changing the URL. Of course, im sure this could be improved upon...

So for instance, to get it to redirect to "http://yourdomain.com/blahblah" you would simply type http://yourdomain.com/jump.php?a=2
 
Status
Not open for further replies.