|
<?php |
|
/* |
|
* Create a unique link/image everytime |
|
* |
|
* ----------- Original ----------- |
|
* <a href='http://ads.domain.com/www/delivery/ck.php?n=<?php echo $campaign; ?>&cb=<?php echo $cache_buster; ?>' target='_blank' cm_dontconvertlink > |
|
* <img src='http://ads.domain.com/www/delivery/avw.php?zoneid=<?php echo $zone; ?>&n=<?php echo $campaign; ?>&cb=<?php echo $cache_buster; ?>' border='0' alt='' cm_dontimportimage /> |
|
* </a> |
|
* |
|
* ----------- New ----------- |
|
* <a href='http://ads.domain.com/www/delivery/gigad.php?type=link' target='_blank' cm_dontconvertlink > |
|
* <img src='http://ads.domain.com/www/delivery/gigad.php?type=img' border='0' alt='' cm_dontimportimage /> |
|
* </a> |
|
* |
|
*/ |
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
header("Cache-Control: no-store, no-cache, must-revalidate"); |
|
header("Cache-Control: post-check=0, pre-check=0", false); |
|
header("Pragma: no-cache"); |
|
|
|
error_reporting(E_ALL); |
|
ini_set("display_errors", 1); |
|
|
|
$banners = array(43,31,32,33,35,36,37,38); |
|
|
|
session_start(); |
|
if ($_SESSION['count'] >= count($banners)) $_SESSION['count'] = 0; |
|
if (!isset($_SESSION['count'])) { |
|
$_SESSION['count'] = 0; |
|
} else { |
|
$_SESSION['count']++; |
|
} |
|
|
|
$def_zone = 17; |
|
$invoc_code = 'ae1eaff8'; |
|
|
|
$bannerid = $banners[$_SESSION['count']]; |
|
|
|
$zone = (!isset($_REQUEST['zone']) || empty($_REQUEST['zone']))? $def_zone : (int) $_REQUEST['zone']; |
|
$campaign = (!isset($_REQUEST['campaign']) || empty($_REQUEST['campaign']))? $invoc_code : $_REQUEST['campaign']; |
|
|
|
if(isset($_REQUEST['type']) && !empty($_REQUEST['type'])){ |
|
$rand = (int) date('Ymdhis'); |
|
$cache_buster = (int) ($rand/9).rand(0,1234); |
|
|
|
switch ($_REQUEST['type']) { |
|
case 'blink': $item = 'http://ads.domain.com/www/delivery/ck.php?bannerid='.$bannerid.'&n='.$campaign.'&cb='.$cache_buster; break; |
|
case 'bimg': $item = 'http://ads.domain.com/www/delivery/avw.php?bannerid='.$bannerid.'&zoneid='.$zone.'&n='.$campaign.'&cb='.$cache_buster; break; |
|
case 'link': $item = 'http://ads.domain.com/www/delivery/ck.php?n='.$campaign.'&cb='.$cache_buster; break; |
|
case 'img': $item = 'http://ads.domain.com/www/delivery/avw.php?zoneid='.$zone.'&n='.$campaign.'&cb='.$cache_buster; break; |
|
|
|
|
|
default: exit(); break; |
|
} |
|
|
|
header('Location: '.$item); |
|
exit(); |
|
} |
|
?> |