Do I save the page as html or php? and is this the page I refer the traffic to as a test?
php gives me what looks like an error when I run it, and html gives me a blank page.
Thanks for the help by the way this is driving me nuts.
You're welcome man. I've done this a few times and even I still have a hard time wrapping my brain around it.
Here's the breakdown.
Page 1. Your blackhat site. Let's say it says, 'Click the link below and input your email address to get your free nude pics of Bert and Ernie' or whatever.
Code:
<html>
<head>
</head>
<body>
'Click the link below and input your email address to get your free nude pics of Bert and Ernie'
<a href="http://www.domain.com/refresh1.html">CLICK HERE FOR MUPPET PORN!</a>
</body>
</html>
Here's refresh1.html
Code:
<html>
<head>
<meta http-equiv="refresh" content="0; url="http://www.domain.com/check1.html">
</head>
<body>
</body>
</html>
here's check1.html as it will be for your testing phase. It will delay for 15 seconds and show you the referrer if there is one. If the referrer is blank, it takes you to yahoo after the pause. This is so you don't get a bunch of false clicks on your aff link while you're testing, but you really get to test the code for syntax errors etc.
Later, when you're ready to launch, you replace yahoo with your affiliate link.
If the referrer didn't clear, it dumps them to google (or whatever page you choose).
Code:
<html>
<head>
</head>
<body>
Your referrer is:
<br>
<br>
<?php
echo $_SERVER['HTTP_REFERER'];
?>
<br>
<br>
If you see a blank space above, the referrer was cleared.
<?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "")
echo '<meta http-equiv="refresh" content="15; url=http://www.yahoo.com">';
else
echo '<meta http-equiv="refresh" content="15; url="http://www.google.com">';
?>
</body>
</html>
And after you've made sure you have all your links formatted properly, here's your check1 page:
Code:
<html>
<head>
</head>
<body>
<?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "")
echo '<meta http-equiv="refresh" content="0; url="http://www.affiliatelink.com">';
else
echo'<meta http-equiv="refresh" content="0; url="http://www.someotherpage.com">';
?>
</body>
</html>
You can do this either as .html or .asp since the php in this example is actually embedded in the html. You can reconfigure it to be, for example, just folders instead of files so you can change the content of the redirect files without having to change the initial link. Also if you use .php instead of html you get a lot more control over what happens when they click.
You can send them to an offer rotator that randomizes the offer they eventually see, for example. Can't do that if you use .html.
You can also try changing the header using javascript if they have it enabled.
But that's another post.
Hope this helps.
-scuba
P.S. I hand typed all the code, so I apologize if there are errors in it. I don't think there are but I'm not in a position at the moment to be able to actually test it. If you get any errors, let me know. I'll be home in an hour or so and I can try to debug then.