Double meta refresh script. dmr.php?url=yoururl

dannyhw

Senior Member
Joined
Jul 16, 2008
Messages
979
Reaction score
476
Just decided maybe I should start using these :p

PHP:
<?php

/*
   Name this dmr.php
   Use: dmr.php?url=http://www.ebay.com/i-am-a-nice-affiliate
*/

dmr();

function dmr() {
	$url = $_GET['url']; 

	// Where you will send them if it fails
	$crap = 'http://your-best-viagra-rimjobs.com/vicodin-sluts'; 
	
	
	if ( $_SERVER['HTTP_REFERER'] == "" ) {
		// If it's blank, who the hell cares?
		refresh($url);
		die();
	} else if ( $_GET['tried'] == '1' ) {
		// Already tried it, fuck it. Zango city.
		refresh($crap);
	} else {
		// Let's try this one more time
		refresh( "dmr.php?url=" . urlencode($url) . 
			"&tried=1" ); // I mean it, one more try
	}
}

function refresh($url) {
	echo "<meta http-equiv='refresh' content='0; url=$url'>";
}

?>
 
where do you put the domain you want it to redirect too?

Do you delete the sidenotes?
 
You don't put the url anywhere, you pass it from the page that calls this page as a parameter just like the example shows you.

Code:
Use: dmr.php?url=http://www.ebay.com/i-am-a-nice-affiliate

No you don't need to delete the comments as nobody sees them.

L
 
what about the '//do it this way'

should I delete those from the code or just copypaste the whole code?
 
Last edited:
I wouldn't relay on a double meta refresh too much because it does leak.
 
Back
Top