This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- THIS METHOD IS VERY INSECURE, USE IT IF NO OTHER OPTIONS IS AVAILABLE --> | |
<!-- Paste this code to head section --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js"></script> | |
<script> | |
function check(secretKey, ttl, signature) { | |
try { | |
let sign = atob(signature); | |
sign = JSON.parse(sign); | |
if (!sign.timestamp || !sign.hash) return false; | |
const signedHash = CryptoJS.HmacSHA1(sign.timestamp, secretKey).toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('crypto'); | |
module.exports = (secretKey, ttl, signature) => { | |
try { | |
let sign = Buffer.from(signature, 'base64').toString('utf8'); | |
sign = JSON.parse(sign); | |
if (!sign.timestamp || !sign.hash) return false; | |
const signedHash = crypto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('API_ACCESS_KEY', ''); | |
define('API_SECRET_KEY', ''); | |
define('LIVE_REPORT_TYPE', 'live-visits'); | |
define('CAMPAIGN_ID', ''); | |
define('FAKE_CONVERSION_PAYOUT', 0.0); | |
define('POSTBACKS_LIMIT', 1); | |
$ch = curl_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('LANDING_SECRET_KEY', 'ODk4ZDc2MjM2MGE4NmRjMmRiY2E3Njg1MDFlZTU0MTIxNjU5YzE1Yw=='); // Your landing secret key from panel.bemob.com -> Settings -> Tracker | |
define('SIGNATURE_TTL', '1 minute'); // How long signature should be valid. Valid formats are explained here: http://php.net/manual/en/datetime.formats.php | |
define('SIGNATURE_GET_PARAM', 'key'); // GET parameter with BeMob landing signature | |
$signature = isset($_GET[SIGNATURE_GET_PARAM]) ? rawurldecode($_GET[SIGNATURE_GET_PARAM]) : exit('Access denied'); | |
if (!$signature = base64_decode($signature)) { | |
exit('Access denied'); | |
} | |
if (!$signature = json_decode($signature, true)) { |