Is a PHP redirect as effective as a double meta refresh?

droppin loads

Newbie
Joined
Jan 2, 2009
Messages
0
Reaction score
0
If I put a PHP redirect through another domain, is it as effective as a DMR?

Will the referrer still be blank and is there any chance of retracing back to the original domain? Comments appreciated.
 
It works on the same principle as a meta redirect. The key is in coding the php for a cloaked redirect and then for an ' if ' statement to return the site to a default page or the same page you redirected to in a loop so that if the user should try to track back to the source, it would only take them to the directed pages you send them to within that loop.

A meta redirect is a fail-safe or default redirect and since it is visible in the html by view source, unlike the php method, I'd highly recommend the php across the board.

It's completely open to opinion and preference though.

If I put a PHP redirect through another domain, is it as effective as a DMR?

Will the referrer still be blank and is there any chance of retracing back to the original domain? Comments appreciated.
 
Thanks for input, I fully understand what you mean about not allowing the user to click the back button (i.e. trapping the person in your site lol). I need to get on that!

+ rep
 
Actually does anyone know the code for a redirect loop?

I can do a simple PHP redirect, but the loop part I'm not so sure of.

Any help would be greatly appreciated :)
 
A php redirect, in general, will NOT mask the referer.
Summary of referer behavior:
PHP Redirect: referer will be where the user came from to get to the redirect page
Meta Refresh: referer will be blank (usually)
Javascript Redirect: referer will be the redirect page

If you want to blank the referer most of the time, use a meta refresh.
If you want to blank the referer EVERY time, use a double meta refresh (making sure it was blank via php)
 
thanks for that.

Can I have two DMRs (each inside a php script) within the same domain?

So essentially:
Ad->DMR1.php->DMR2.php->merchant
DMR 1 and 2 would be on the same domain? Would this work?
 
Here is the code for the type of php double meta refresh I do--only requires 1 page. (You can name it whatever you want--it looks itself up for the first bounce.)

Code:
<?php
//Grab arguments from the GET string
$SEC = $_GET['S'];

//If on second bounce SEC = 1
if ( $SEC == '1' )
{
 //Validate (make sure the referer cleared)
 if ( $_SERVER['HTTP_REFERER'] == '' )
 {
   //Landing page
   $bounce_loc='referer.php';
 }
 else //Bad! dump them somewhere!
 {
   //Dump location (for metas that didn't clear)
   $bounce_loc="http://www.google.com";
 }
}
else //First time through--bounce them back!
{
 $self = $_SERVER['SCRIPT_NAME'];
 $bounce_loc="$self?S=1";
}
?>

<html>
<head>
<?php
print("<meta http-equiv=refresh content='0;url=$bounce_loc'>");
?>
</head>
<body>

</body>
</html>

Enjoy! Hope this helps :)

What you said would work fine--but I find this way very elegant ;-)
 
Last edited:
So for the referer.php content, would I just use a simple php redirect? I assume that redirect.php would only get executed when the referrer is blank (I'm horrible at reading PHP code but this is what I am interpreting so please bear with me :) )
 
That code is posted if for the FULL redirect structure. No other redirects needed. :)

Basically works like this:
-You link user to that page from anywhere you want
-The page meta refreshes back to itself + the argument ?S=1 appended on the end of the link
-On the reload, the page says "Hey this is their second view (since S=1, as opposed to nothing)--is their referer cleared?" and if it is cleared shoots them off to your affiliate, if not it dumps them to google.
 
Hey Kenneth, I really appreciate you taking the time to walk through your stuff with a dummy like me :)

That was my understanding as well (your above post). When I put in a URL directly as below, I get an error (the URL btw has been modified so it would be garbage if you clicked on it, but just used as an example of the link format):

//Landing page
$bounce_loc='http://nbjmp.com/click/?s=32234&c=90345';

If I put in a php redirect as below it works:
//Landing page
$bounce_loc='landingpage.php';

Any reason why this would be happening? Should I just include the php redirect?
 
Hey Kenneth, I really appreciate you taking the time to walk through your stuff with a dummy like me :)

That was my understanding as well (your above post). When I put in a URL directly as below, I get an error (the URL btw has been modified so it would be garbage if you clicked on it, but just used as an example of the link format):

//Landing page
$bounce_loc='http://nbjmp.com/click/?s=32234&c=90345';

If I put in a php redirect as below it works:
//Landing page
$bounce_loc='landingpage.php';

Any reason why this would be happening? Should I just include the php redirect?

What error are you getting?

What do you mean by "just include the php redirect"?
 
The browser just displays ");?>

I assume it doesn't like the print command for some reason but I haven't modified it at all. I only added in a URL to the first bounce variable.

Are there some "/" missing from the above code? I think forums sometimes screw up the display of code. Thanks man
 
Last edited by a moderator:
sorry dude it's working now. Something fucked up with my html editor that screwed up the code somehow.

Anyways thanks alot man, appreaciate all your help!
 
I have not thought that there will be a problem with php redirect. Thanks for the info.
 
Hello drkenneth, may you clear one detail cause i still cant get. Should we replace "referer.php" in //Landing page$bounce_loc='referer.php'; with our affiliate link, or? Anyway when i do replace it with my own link i get 403 error
 
Hello drkenneth, may you clear one detail cause i still cant get. Should we replace "referer.php" in //Landing page$bounce_loc='referer.php'; with our affiliate link, or? Anyway when i do replace it with my own link i get 403 error

Replace it with the absolute path to the affiliate link, e.g. "http://www.affiliatesite.com?id=23112" I believe the problem is you're leaving out the http:// and so it is trying a relative path (on your site) as opposed to a absolute path.
 
thanks drkenneth for the script , i'm no expert at double meta refresh , so i have a few qustions to ask
how can the meta (referer) be not cleared after refreshing the page ?
and is there any other command than $_SERVER['HTTP_REFERER'] the network can extract informations about the previous page ?
 
Some browsers simply don't clear the referer on a meta refresh. One leak can give you up, so it's better to be safe and check to make sure the browser you're dealing with is capable of clearing the referer before sending them to the destination.

The referer (i.e. $_SERVER['HTTP_REFERER']) is the only identifying information sent about previous pages.
 
True. Opera leaks DMR I recently found in some tests. Better check on a gateway third page to be 100%.

Some browsers simply don't clear the referer on a meta refresh. One leak can give you up, so it's better to be safe and check to make sure the browser you're dealing with is capable of clearing the referer before sending them to the destination.

The referer (i.e. $_SERVER['HTTP_REFERER']) is the only identifying information sent about previous pages.
 
Back
Top