37.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

02-01-2012, 09:08 PM
Post: #1
Rotating Redirection Scripts
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);
}

?>
03-12-2012, 05:58 PM
Post: #2
RE: Rotating Redirection Scripts
how can i use this to multiple adwords accounts + coupons? do you think is safe to do?




75.gif