Live Http Header addon

CapMorgan

Junior Member
Joined
Dec 15, 2007
Messages
147
Reaction score
238
Do you have to go to the top of the Header list to see the original refer, or do you only look at the last block of header info?
 
The first one is all you need if you just want to see the original referrer. Example, open live http and click the home key here. In the top most block you'll see:

Referer: http://www.blackhatworld.com/blackhat-seo/cloaking-content-generators/33541-live-http-header-addon.html

Says you came from this thread.

If you then clear live http and try typing something into your browser bar, you'll see that in that very first chunk, there is no referer listed at all.


When I'm testing new stuff I just set up a "landing page" that echoes the referer information. Simple, easy and reliable and you can test lots of different browsers easily that way.
 
So just to clarify. If I setup a landing page with a double meta refresh. Clear live http. Then run the landing page. I should not see my landing page on the top chunk of info. Correct?

Have you ever ran into an offer that you could not blank a referer on?
 
So just to clarify. If I setup a landing page with a double meta refresh. Clear live http. Then run the landing page. I should not see my landing page on the top chunk of info. Correct?

Have you ever ran into an offer that you could not blank a referer on?

Actually I was talking about skipping live http altogether.

Just put this code on your page and it will show you the referrer if there is one for your testing.
Code:
<?php
echo $_SERVER['HTTP_REFERER'];
?>

If it shows anything, the refresh didn't work for that particular browser.
If it's blank, the refresh worked.

And the refresh has nothing to do with the offer, it's a browser issue. this just gives you a faster way to check your double meta setup yourself by echoing the referrer out onto the page itself.
 
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.
 
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.
 
Last edited:
For some reason this sends my refresh1 page into an immediate and constant load & refresh. There does not seem to be a 15 second delay, and it never goes to yahoo or google. I am going to read over your post another 10 times to make sure I have it correct.

I just noticed you edited your post so I will redo the full process to make sure I grab all changes.
 
Last edited:
Hey CapMorgan... I've been working on this as well... learning and ran into the same problem. Here's the small issue:
Code:
<html>
<head>
<meta http-equiv="refresh" content="0; url=[COLOR="Red"]"[/COLOR]http://www.domain.com/check1.html">
</head>
<body>
</body>
</html>

Just remove this highlighted 'quote' - (")
Voila... let me know how that goes!

(edit - same may also be true for the next page...)
 
Last edited:
Thanks for jumping in xhanuman. Yes this stopped the rotation, and helped me realize where to change the transfer time. Now it is being forwarded. Scubaslick your code was real good for just coding by hand. Thanks

My only problem now is it is being forwarded to google instead of Yahoo which tells me that the referer is showing. The page before the forward though is saying that the referer is blank. Which is correct?

To add : The forward does not work in IE at all. It stops at the check1.html page, and just sits there.
 
Last edited:
Thanks for jumping in xhanuman. Yes this stopped the rotation, and helped me realize where to change the transfer time. Now it is being forwarded. Scubaslick your code was real good for just coding by hand. Thanks

My only problem now is it is being forwarded to google instead of Yahoo which tells me that the referer is showing. The page before the forward though is saying that the referer is blank. Which is correct?

To add : The forward does not work in IE at all. It stops at the check1.html page, and just sits there.

Sorry about disappearing yesterday. Bit of a family emergency. In fact I've only got a couple of minutes now, but I'll try to test this code finally.

I've used it before basically exactly as written without any problems. I'm sure I just missed a little detail somewhere.

Give me a couple minutes and I'll see what I can do.
 
Working for me fine, other than the extra quotes found by xhanuman. Try renaming the pages to index.php, refresh.php and check1.php.

Be sure you change your links inside the code as well. <meta etc etc. url= etc etc etc.php>

I'm not the greatest php guy in the world but I know that sometimes the different version like things done different ways. I assume it has something to do with the way the server executes the code, so basically by renaming the file to .php, your server expects there to be php code inside, even if it's actually a straight forward .html document and reacts differently to it.

Crazy, but it works.

And I'm not sure I understood what you meant by "the page before" is showing as blank.

Here's something you can add to you first page to check stuff out though. Below the first link to refresh.php, just toss in:

Code:
<br><br>Or click <a href="http://domain.com/check1.php"> this link to see one with a referrer in tact</a>

That way from your first page you have a way to skip the meta refresh also, leaving the referer and it should then resolve to google after the pause, proving that the if clause is functioning properly.

Let me know how it goes.
 
Last edited:
It Works.

The trick for me was to save it all as php instead of html. I do not know why this did not work the first time but it does now. This may have been an issue because my .htaccess file is not configured to read html as php.

You also must make sure that the first quotes are removed as stated before in the posts.

The final problem I had was that the referer blank was working, but I got the below error before the final forward.

Notice: Undefined index: HTTP_REFERER in (HOSTING SERVER)

I tried to find a way to fix this which I believe may also be caused by the .htaccess file but found an easier fix. I just added a piece of code to the check1.php file that says to not show the error.

Here is the check1.php code with error_reporting(E_ALL ^ E_NOTICE); added

Code:
<html>
<head>
</head>
<body>
<?php
    error_reporting(E_ALL ^ E_NOTICE); 

    $referer = $_SERVER['HTTP_REFERER'];

    if($referer == "")

    echo '<meta http-equiv="refresh" content="0; url=http://www.yahoo.com">';    

    else
    
    echo'<meta http-equiv="refresh" content="0; url=http://www.google.com">';

?>
</body>
</html>

The forward not works, blanks, works in both IE and Firefox, and does show any text on the screen on the forwards.

Again I appreciate the help troubleshooting this both scubaslick, and xhanuman. I do not think I could have figured this out with out the help.

Hopefully this post will help someone else out with the same problem.
 
Last edited:
Thank you guys as well - scubaslick, and CapMorgan - I'm just revisiting this today - it's funny how the PIECES fit together ever slowly, but eventually. I was thinking hmm would I need to do this on my white hat sites? I had the affiliate link/graphic... so I'm thinking - NO, I wouldn't need it in this case. Eventually others will come across this and take the time to try all of this out... maybe it will click!

Hard to keep the lines drawn clearly among one's sites... black/grey/white... but necessary!
 
Back
Top