1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DMR for Unlimited CPA links

Discussion in 'CPA' started by mraxe, Feb 18, 2009.

  1. mraxe

    mraxe BANNED BANNED

    Joined:
    Jul 28, 2008
    Messages:
    133
    Likes Received:
    16
    Guys,

    I dont know if some of you may already have this.

    For those who dont.Here is it.

    There are 2 files to be uploaded.

    1. Index.php
    2.Url1.php

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <?php
        $referer = $_SERVER['HTTP_REFERER'];
    //    if($referer == "")
        {
            echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.YOURDOMAIN.com/url1.php\">";
        }
    ?>
    </head>
    <body>
    </body>
    </html>
    
    

    In the URL1.php file,put in as many links as you want to.
    The traffic will be split EQUALLY among all the CPA offers
    plus DMR would not leave any traces.

    Code:
    <?php
    $url[] = "http://google.com";
    $url[] = "http://ask.com";
    $url[] = "http://yahoo.com";
    $url[] = "http://msn.com";
    $url[] = "http://aol.com";
    $referer = $_SERVER['HTTP_REFERER'];
    //if($referer == "")
    {
    	$filename = "ic_redirectidx.txt";
    	$countervalue = 0;
    	if (file_exists($filename))
    	{
    		$lines = file($filename);
    		$countervalue = intval($lines[0]);
    		if ($countervalue >= sizeof($url) || $countervalue < 0) $countervalue = 0;
    	}
    
    	$umask = umask(0777);
    	if (file_exists($filename))	chmod($filename, 0666);
    	if ($handle = fopen($filename, "a"))
    	{
    		flock($handle,LOCK_EX);
    		ftruncate($handle,0);
    		fwrite($handle, ($countervalue+1));
    		fflush($handle);
    		flock($handle,LOCK_UN);
    		fclose($handle);
    	}
    	clearstatcache();
    	if (file_exists($filename)) chmod($filename, 0666);
    	umask($umask);
    	echo "
    	<html>
    	<head>
    	<meta http-equiv='refresh' content='0;url=".$url[$countervalue]."'>
    	</head>
    	<body>
    	</body>
    	</html>";
    }
    ?>
    
    Have fun.

    Best.
     
    • Thanks Thanks x 4
  2. mraxe

    mraxe BANNED BANNED

    Joined:
    Jul 28, 2008
    Messages:
    133
    Likes Received:
    16
    If it works fine - be generous - hit the THANKS button.
     
  3. intence

    intence Regular Member

    Joined:
    Nov 21, 2008
    Messages:
    435
    Likes Received:
    77
    havent tried it but thanks
     
  4. mraxe

    mraxe BANNED BANNED

    Joined:
    Jul 28, 2008
    Messages:
    133
    Likes Received:
    16
    its working fine guys.
     
  5. genie1

    genie1 Junior Member

    Joined:
    May 30, 2008
    Messages:
    151
    Likes Received:
    50
    Home Page:
    A rotator is even more customizable and might be worth looking into. This is essentially one at its most basic level and should work for anyone who needs it in a pinch. Great share!

    You can even get more fancy using tracking pixels installed by your account managers into the offers your promoting so that the rotator can give weight to the offers converting the most. But that's getting REALLY fancy schmancy now :D
     
  6. mraxe

    mraxe BANNED BANNED

    Joined:
    Jul 28, 2008
    Messages:
    133
    Likes Received:
    16
    Thanks for your suggestion genie.

    Rotation is in place now.

    Much appreciated.