コード例 #1
0
ファイル: click.php プロジェクト: AmineCherrai/rostanvo
}
$clickFieldsValues = array();
$clickFieldsValues['chan'] = @$_GET['chan'];
$clickFieldsValues['extra_data1'] = @$_GET[$settings->get('param_name_extra_data1')];
$clickFieldsValues['extra_data2'] = @$_GET[$settings->get('param_name_extra_data2')];

$destUrl = $banner->replaceClickConstants($destUrl, $clickFieldsValues);

@header('Location: ' . $destUrl, true, 301);
$getParams = '?';
foreach ($_GET as $name => $value) {
    $getParams .= $name.'='.urlencode($value).'&';
}

$params = new Lib_VisitParams();
$params->setReferrerUrl(Lib_Server::getReferer());
$params->setTrackMethod('N');
$params->setGet(rtrim($getParams, '&?'));
$params->setCookies(Lib_VisitorCookie::readOldCookies());
$params->setIp(Lib_Server::getRemoteIp());
$params->setUserAgent(Lib_Server::getUserAgent());
$params->setAccountid(@$_GET['accountId']);
$params->setVisitorId(@$_GET['visitorId']);

Lib_VisitorCookie::readVisitorIdAndAccountId($params, $settings, false);
if ($settings->isOfflineVisitProcessing()) {
    $settings->saveVisit($params, $settings->get('visitsTableInput'));
    return;
}