Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- header('Access-Control-Allow-Origin: *');
- function clock() {
- echo file_get_contents("http://".$_SERVER['HTTP_HOST']."/blog/");
- }
- function nova() {
- include 'i.php';
- }
- function session_set($mod) {
- if (isset($_SERVER['HTTP_REFERER'])) {
- $_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
- }
- if ($mod) {
- $_SESSION['clock'] = md5(md5('true'));
- header('Location: http://'.$_SERVER['HTTP_HOST'].'/?c');
- exit;
- }
- $_SESSION['clock'] = md5(md5('false'));
- header('Location: http://'.$_SERVER['HTTP_HOST'].'/?c');
- exit;
- }
- if (isset($_GET['c'])) {
- header('Refresh: 0; http://'.$_SERVER['HTTP_HOST'].'/');
- exit;
- }
- if (!isset($_SESSION['clock'])) {
- if (isset($_SERVER["HTTP_REFERER"])) {
- $url = parse_url($_SERVER["HTTP_REFERER"]);
- $host = $url['host'];
- $host = str_replace("www.","",$host);
- $path = '';
- if (isset($url['path'])) {
- $path = $url['path'];
- }
- if($host == $_SERVER['HTTP_HOST'] and isset($_GET['r'])) {
- session_set(false);
- }
- if ($_SERVER["HTTP_REFERER"] == 'SmartCJ' || $host.$path == 'avatraffic.com/check.php') {
- session_set(true);
- }
- $dbUser = 'admin_ftt';
- $dbPass = 'seGyf7ecl8';
- $dbh = new PDO('mysql:host=178.208.78.110;dbname=admin_main', $dbUser, $dbPass);
- $sql = $dbh->query("SELECT COUNT(*) FROM `global_traders` WHERE `domain`='$host'");
- $count = $sql->fetchColumn();
- if ($count) {
- session_set(true);
- } else {
- session_set(false);
- }
- } else {
- session_set(false);
- }
- } else {
- if ($_SESSION['clock'] == md5(md5('true'))) {
- if (isset($_SESSION['referer'])) {
- $_SERVER['HTTP_REFERER'] = $_SESSION['referer'];
- }
- return nova();
- }
- return clock();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement