Best Blackhat Forum

Full Version: Rotating Redirection Scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here is a simple script to rotate your redirections:

Code:
<?php
$url=array(
    'url1',
    'url2',
    'url3'
);
$random=rand(1,count($url));

header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$url[$random]);

//echo $url[$random];

?>



And this one rotates and redirects based upon the persons operating system:

Code:
<?php
$windows_url = 'http://www.microsoft.com/';
$mac_url     = 'http://www.apple.com/';
$other_url   = 'http://www.lemonparty.org/';

$user_agent = $_SERVER['HTTP_USER_AGENT'];

if(preg_match('/microsoft|window/i', $user_agent)) {
    header("Location: $windows_url", true, 301);
} elseif(preg_match('/mac|os x/i', $user_agent)) {
    header("Location: $mac_url", true, 301);
} else {
    header("Location: $other_url", true, 301);
}

?>
how can i use this to multiple adwords accounts + coupons? do you think is safe to do?
Reference URL's