Help: PHP Redirect For Affiliate CPA Links

painreliefbullet

Registered Member
Joined
May 31, 2011
Messages
69
Reaction score
12
I have domains that use to forward offers to, but right now I need to do php redirect as my direct links get my yahoo answers posts flagged down. I want to try this method, but I'm not paying for hosting anywhere. Am I missing something to where I can do this with my existing domains even though I'm not paying for hosting? I buy my domains thru godaddy and yahoo mainly. I need to upload a php file somewhere, I'm just not quite understanding this process and I need to mask click bank affiliate links without buying more domains when I may get flagged down anyway.
 
Just get free hosting at 000webhost.com and upload your php file there.
 
that's awesome, thank you. i'm gonna set that up right now and then get filezilla to upload it. thank you so much.
 
Try using something like http://zcu.be/ to shorten your links. bit.ly may be blocked on Yahoo answers but other lesser known ones aren't :)
 
If you want to use your existing domains for forwarding you can host them @blogger. I don't know about Y!, but for godaddy they now have (blogger) a one-button-set-everithing, beside it is quite fast and free to use.

As for redirecting, a 301 php redirect it's not always the best option. Some script can bypass, because of the 301, the domain and still get to the live site.

So, if you want to try blogger (which does not have php support), you can place this little code (javascript) between head ... /head and you're all set. Also, javascript redirection (being a client side redirect) will leave the referrer as the redirection domain, and not the actual source (like a 301 will do).

HTML:
<script language='javascript'>
document.location='http://YOURURLHERE';
</script>
 
HTML:
<script language='javascript'>
document.location='YOURURLHERE';
</script>
Got a question on this. So how exactly does this javascript cloak work?

Normally, I do a redirect through my domain with a PHP array, which doesn't cover up, always?

So, to get the java to work, do you need to direct the person to the blog and have them click on a link on the blog or can it be set up so it takes them to the offer page (showing the blog as referrer)? If yes, how please? :)

Thanks.
 
FTP this .php file to a new directory inside a new directory named RECOMMENDS on your host and name the file - index.php

<?php
header("location: http://www.AFFILIATE_LINK");
?>

Now your masked link is DOMAINNAME\RECOMMENDS\NEWDIRECTORY\index.php
and it will redirect to your affiliate link
 
Last edited:
I have domains that use to forward offers to, but right now I need to do php redirect as my direct links get my yahoo answers posts flagged down. I want to try this method, but I'm not paying for hosting anywhere. Am I missing something to where I can do this with my existing domains even though I'm not paying for hosting? I buy my domains thru godaddy and yahoo mainly. I need to upload a php file somewhere, I'm just not quite understanding this process and I need to mask click bank affiliate links without buying more domains when I may get flagged down anyway.



here's random redirect




Code:
<?php
$num = Rand (1,2);
switch ($num) {
case 1: header('Location: http://affiliate.com');
break;
case 2: header('Location: http://affiliate.com');
break;
}
?>

You can add more if you want
 
FTP this .php file to a new directory inside a new directory named RECOMMENDS on your host and name the file - index.php

<?php
header("location: AFFILIATE_LINK");
?>

Now your masked link is DOMAINNAME\RECOMMENDS\NEWDIRECTORY\index.php
and it will redirect to your affiliate link
Was that to me or the OP?

This is what I put in my index.php file that I upload to a folder (FOLDERNAME).

Code:
<?php 
$link=array(
WORD1=>"AFFILIATE LINK",
WORD2=>"AFFILIATE LINK",

); 
$url=$link[$_GET['WORD']]; 
header("Location: ".$url); 
?>

Then link to it with: mydomaindotcom/FOLDERNAME/?WORD=WORD1

WORD1 and WORD2 could also just be 1 and 2. Just used those as examples and you can have more then 2.

So this masks the affiliate link, but would the referrer be shown as my domain or the actual referrer?

Thanks.

Edit: Guess this would answer your question too OP, if it masks referring as well.
 
Ok, you don't need to take my word for it, you can try it yourself.
You will need 4 pages like so (put them all in the same folder):

PAGE1 (index.html)

Code:
<html>
<head>
</head>
<body>
<a href="php.php">php</a><br><br>
<a href="js.html">js</a><br><br>
</body>
</html>
PAGE2 (js.html)

Code:
<html>
<head>
<script language='javascript'>
document.location='offer.php';
</script>
</head>
<body>
</body>
</html>
PAGE3 (php.php)

Code:
<?php
header("location: offer.php");
?>
PAGE4 (offer.php)

Code:
<?php
echo $_SERVER['HTTP_REFERER'];
?>
Go to index.html and open both of the links in a new tab, you will see these results:

Code:
PHP REDIRECT: http://mysite.com/
JS  REDIRECT: http://mysite.com/js.html
So, which one truly fakes the referrer?
 
Last edited:
Back
Top