Referer Based Redirect Script : Put to use and make some $$$

extremephp

BANNED
Joined
Oct 19, 2010
Messages
1,288
Reaction score
1,281
Few methods that I get in my head.
(Try it. I cant really guarantee anything)

Redirect if the user is coming from Google to your CPA. (How about getting approved in Adwords and doing that? :D )

Sending Traffic to Virurl and kind of sites? (I GOT PAID BY THEM :D)

Redirecting Facebook traffic to places where they arent allowed? Or sending non-allowed traffic to the places where you can make money?


Put it into use, and use your head.

In wordpress :

Put it in top of your header :

Code:
<?php

/**
 * @Referer Based Redirector v1.0 by Extremephp
 * @copyright No such shits xD
 */

$referer = $_SERVER['HTTP_REFERER'];
$string = "facebook.com/";//edit it
$piece = "yoursite"; // edit it

$value = strpos($referer, $string);
if ($value > 0)
{
        echo '<script type="text/javascript">
        window.location = "http://yoursite.com/rotator.php"
        </script>';
}
else {}

$final = strpos($referer, $piece);
if ($final > 0)
{
     echo '<script type="text/javascript">
    window.location = "http://yoursite.com/redirector.php"
        </script>';
}

//Done with it. Thanks

?>
Rotator :

Code:
<?php

/**
 * @Referer Based Redirector v1.0 by Extremephp
 * @copyright No such shits xD
 */
//Rotator
//function - it get opened by header and send the user back to CPA via final referer page

$finalreff = array("http://yoursite.com/page","http://yoursite.com/page2");// this should be a page in your site and this will be the referrer shown to the end site
$no = rand(0,1);//edit dependant on the number of sites added above

header('Location: '. $finalreff[$no]);

?>
Redirector :

Code:
<?php

/**
 * @Referer Based Redirector v1.0 by Extremephp
 * @copyright No such shits xD
 */
//final redirector
//function - throw the visitors to your cpa site with referer urls given in rotator.php

$cpa = array("http://YOUROFFERURL.com","http://YOUROFFERURL2.com");
$rand = rand(0,1);//edit it depending the num of sites added.

header('Location: '. $cpa[$rand]);


?>
No blabbering, and I dont own the method, and it isnt anything so new, and am sure a lot would be already using this for diff stuffs.


Questions are welcome. Simple suggestions would be taken care and will be added to the script. (Well you know, I amnt a coder, I am just learning it all.)
 
Forgot to add :

In short, what it does is.

If we want to redirect users coming from adultsite (adultsite.com) to a site where adult traffic isnt allowed,

change $string to adultsite.com.

So user from adultsite.com > Rotater > Your sites other page > Redirecter > Your Cpa or whatever.

So from the CPA sites end, what they see is the traffic is coming from "Your sites other page ".

And if they try visiting your site, they wont be redirected so you are safe. To make it safer, add a banner or link somewhere in the page, so even if they visit your site to check, they can have peace of mind hoping the traffic was from the banner clicks on your site :D
 
Last edited:
Last bump for this thread :

I got my friend saying that he got approved in Adwords and Bing Ads using this stuff and is redirecting visitors to his CPA. =))

Use if before it gets patched somehow.
 
It has sparked an idea that I have had previously. Don't worry if it gets patched because it won't. But thanks anyways.
 
Last edited:
Thanks extermephp Ive been running something like this for a while now, but now I need it to be in a iframe, I have similar thread opened up since last year. here

here the simple code I used before
Code:
<?php
$referrer=$_SERVER['HTTP_REFERER'];

if ($referrer=="http://facebook.com")
$site="http://websiteA.com";
elseif ($referrer=="http://twitter.com")
$site="http://websiteB.com";
else
$site="http://websiteC.com";
?>

But now I am trying to implement it into a iframe now, only problem is the iframe page is not full page at all, I tried everything width and height 100% etc etc

Code:
<?php
$referrer=$_SERVER['HTTP_REFERER'];

if ($referrer=="http://facebook.com")
$site="http://websiteA.com";
elseif ($referrer=="http://twitter.com")
$site="http://websiteB.com";
else
$site="http://websiteC.com";
?>
<iframe src="<?php echo $site;?>" </frame>

so I figured I post in here see if you can take a look at it, sorry if I kinda stepping on your toes thread wise or what not.
 
Cool thread extreme php.. Looks like you worked real hard on this one.
 
Back
Top