It takes less than 5 minutes to integrate Revlum into your Vie Faucet Script. Let's get started.
1. Open file - application/controllers/wh
and enter the following piece
of code before last closing bracket (}
).
public function revlum()
{
$secret = ""; // UPDATE YOUR SECRET KEY
$hold = 3; // UPDATE HOLD DAYS IF YOU USE HOLD
$minHold= 0.5; // Reward Lower than this amount will not be hold
$userId = isset($_REQUEST['subId']) ? $this->db->escape_str($_REQUEST['subId']) : null;
$transactionId = isset($_REQUEST['transId']) ? $this->db->escape_str($_REQUEST['transId']) : null;
$reward = isset($_REQUEST['reward']) ? $this->db->escape_str($_REQUEST['reward']) : null;
$userIp = isset($_REQUEST['userIp']) ? $this->db->escape_str($_REQUEST['userIp']) : "0.0.0.0";
$signature = isset($_REQUEST['signature']) ? $this->db->escape_str($_REQUEST['signature']) : null;
if (md5($userId . $transactionId . $reward . $secret) != $signature) {
echo "ERROR: Signature doesn't match";
return;
}
$trans = $this->m_offerwall->getTransaction($transactionId, 'Revlum');
if ($trans == 2) {
$this->m_offerwall->reduceUserBalance($userId, abs($reward));
$this->m_offerwall->insertTransaction($userId, 'Revlum', $userIp, $reward, $transactionId, 1, time());
echo "ok";
} else {
if (!$trans) {
$hold = 0;
if ($reward > $minHold) {
$hold = 3; // UPDATE HOLD DAYS Which you Use for hold
}
if ($hold == 0) {
$offerId = $this->m_offerwall->insertTransaction($userId, 'Revlum', $userIp, $reward, $transactionId, 2, time());
$this->m_offerwall->updateUserBalance($userId, $reward);
$this->m_core->addNotification($userId, currencyDisplay($reward, $this->data['settings']) . " from Revlum Offer #" . $offerId . " was credited to your balance.", 1);
$user = $this->m_core->getUserFromId($userId);
$this->m_core->addExp($user['id'], $this->data['settings']['offerwall_exp_reward']);
if (($user['exp'] + $this->data['settings']['offerwall_exp_reward']) >= ($user['level'] + 1) * 100) {
$this->m_core->levelUp($user['id']);
}
} else {
$availableAt = time() + $hold * 86400;
$offerId = $this->m_offerwall->insertTransaction($userId, 'Revlum', $userIp, $reward, $transactionId, 0, $availableAt);
$this->m_core->addNotification($userId, "Your Revlum Offer #" . $offerId . " is pending approval.", 0);
}
echo "ok";
} else {
echo "DUP";
}
}
}
2. Inside application/controllers/offerwall
file, add this code before last closing bracket (}).
public function revlum()
{
$api_key="";
$this->data['page'] = 'Revlum Offerwall';
$this->data['iframe'] = '<iframe style="width:100%;height:800px;border:0;padding:0;margin:0;" scrolling="yes" frameborder="0" src="https://revlum.com/offerwall/' . $api_key . '/' . $this->data['user']['id'] . '"></iframe>';
$this->data['wait'] = 3;
$this->render('offerwall', $this->data);
}
3. Go to this file application/views/user_template/template, and place this code above or under some of the existing offerwalls.
<li><a href="<?= site_url('offerwall/revlum') ?>" key="t-revlum">Revlum</a></li>
4. Add below code on your config files:
-
Open
Application/Config/config
- Find
$config['csrf_exclude_uris']
- Add this code to array
'wh/revlum',
EXAMPLE :
$config['csrf_exclude_uris'] = array('wh/coinbase', 'wh/revlum', 'wh/faucetpay', 'wh/payeer', 'wh/bitswall', 'auto/verify', 'dice/roll', 'coinflip/flip', 'wheel/verify', 'coupon/check');
VIE POSTBACK
This is the postback code that you need to past in Revlum's dashboard - https://yourdomain.com/wh/revlum