Untitled
Untitled
Untitled
php
/
*==================================================================================
=========================*/
/* CONFIGURATION
*/
/
*==================================================================================
=========================*/
/* replace false with true to switch from debug to production mode */
$config['debug'] = false;
/* Geo filter: Display offer page only to visitors from allowed countries. */
/* For example, if you enter 'ID|US' in the next line, system will only allow users
from Indonesia and USA */
$config['allowed_country_code'] = 'ID';
/* Blocked Geo filter: Hide offer page from visitors of selected countries. */
/* For example, if you enter 'IN|CN' in the next line, system will block users from
India and China */
$config['blocked_country_code'] = 'MY|US|SG|RU|UK|IE';
/* replace false with true to switch from single offer page to mutiple offer page
on selected country */
$config['multiple_offer_page'] = false;
/* replace false with true to allow user direct access from browser */
$config['no_ref'] = false;
if (empty($config['default_white_page']) || (!strstr($config['default_white_page'],
'://') && !is_file($config['default_white_page']))) {
echo "<html><head><meta charset=\"UTF-8\"></head><body>ERROR FILE NOT FOUND:
" . $config['default_white_page'] . "! \r\n<br>";
die();
}
if (empty($config['default_offer_page']) || (!strstr($config['default_offer_page'],
'://') && !is_file($config['default_offer_page']))) {
echo "<html><head><meta charset=\"UTF-8\"></head><body>ERROR FILE NOT FOUND:
" . $config['default_offer_page'] . "! \r\n<br>";
die();
}
if (function_exists('header_remove')) header_remove("X-Powered-By");
@ini_set('expose_php', 'off');
$decodedData = json_decode($cloackedData);
if ($config['debug']) {
print_r($cloackedData);
die();
} else {
if (!empty($decodedData->allow) && $decodedData->allow) {
if ($config['multiple_offer_page']) {
$arrOfferData = explode('|', $config['multiple_offer_data']);
foreach ($arrOfferData as $data) {
$detail = explode(';', $data);
if ($detail[0] == $decodedData->country_code) {
renderOffer($detail[1], $config['allowed_params'],
$config['render_offer_method']);
} else {
renderOffer($config['default_offer_page'],
$config['allowed_params'], $config['render_offer_method']);
}
}
} else {
renderOffer($config['default_offer_page'], $config['allowed_params'],
$config['render_offer_method']);
}
} else {
if (!empty($decodedData->type) && $decodedData->type != 'config') {
echo($cloackedData);
die();
} else
renderWhite($config['default_white_page'],
$config['render_white_method']);
}
}
if (empty($page)) {
header("HTTP/1.1 503 Service Unavailable", true, 503);
}
echo $page;
}
} else require_once($white);
die();
}