ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/vidoe.top/proxy/ |
<?php session_start(); function curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5"; curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36'); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); //curl_setopt($ch, CURLOPT_REFERER, 'http://www.phimmoi.net'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $page = curl_exec($ch); curl_close($ch); return $page; } function post($url,$data) { $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,application/x-www-form-urlencoded"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; // browsers keep this blank. $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36'; $process = curl_init($url); curl_setopt($process, CURLOPT_HTTPHEADER, $header); //curl_setopt($process, CURLOPT_REFERER, 'https://www.anivn.com'); //curl_setopt($process, CURLOPT_HEADER, 1); curl_setopt($process, CURLOPT_USERAGENT, $user_agent); //curl_setopt($process, CURLOPT_COOKIEFILE, 'cookies.txt'); // curl_setopt($process, CURLOPT_COOKIEJAR, 'cookies.txt'); curl_setopt($process, CURLOPT_ENCODING , 'gzip'); curl_setopt($process, CURLOPT_TIMEOUT, 10); //if ($this->proxy) curl_setopt($process, CURLOPT_PROXY, $this->proxy); curl_setopt($process, CURLOPT_POSTFIELDS, $data); curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); curl_setopt($process, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($process, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($process, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($process, CURLOPT_POST, 1); $return = curl_exec($process); curl_close($process); return $return; } if(isset($_GET['code'])){ /*https://accounts.google.com/o/oauth2/auth? redirect_uri=https://www.123vid.net/proxy/Drive5.php& response_type=code& client_id=282622663864-je8r6h2l0hh8l12dgjj9kuqk4ifki149.apps.googleusercontent.com& scope=https://www.googleapis.com/auth/drive.file+https://www.googleapis.com/auth/analytics.readonly+https://www.googleapis.com/auth/userinfo.email& approval_prompt=force& access_type=offline*/ $data = 'code='.$_GET['code'].'&client_id=282622663864-je8r6h2l0hh8l12dgjj9kuqk4ifki149.apps.googleusercontent.com&client_secret=RyuEoYsBbH2RmKhbRu7L1QBL&redirect_uri=https://www.123vid.net/proxy/Drive5.php&grant_type=authorization_code'; $content = post('https://accounts.google.com/o/oauth2/token',$data); $arr = json_decode($content,true); $_SESSION['access_token'] = $arr['access_token']; $_SESSION['refresh_token'] = $arr['refresh_token']; //show content //$token = 'ya29.GlspBY5SMZzHxCoTPoi_ENEnO3yhH5mi6idCJ22jWzPS07FkzQqvG9mH8DKm8v_A6b5ROdJIgTM9dRXuxilm4mz88Q9JvMThQb_F3Dwvwcah_Nx-7BfI57R6jNCp'; //$refresh_token = '1/mVGCZzYDx_NK_kJ6vTcr_QOt3ShsTzjQOMOxiEP9d0E'; header('Location: https://www.123vid.net/proxy/Drive5.php'); } $access_token = $_SESSION['access_token']; $refresh_token = $_SESSION['refresh_token']; $url = 'https://www.googleapis.com/drive/v3/files/1A8SbpTGnd-wkPr6nbCscEHyBqKAvH1Yj?&key=AIzaSyBHeO9D8mVKmcSLQO-8aLAujim-eBpXfgo&alt=media&videoplay.mp4'; ini_set('max_execution_time', 0); $useragent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36"; $v = $url; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Authorization: Bearer ".$access_token )); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 222222); curl_setopt($ch, CURLOPT_URL, $v); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); $size2 = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); header("Content-Type: video/mp4"); $filesize = $size2; $offset = 0; $length = $filesize; if (isset($_SERVER['HTTP_RANGE'])) { $partialContent = "true"; preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches); $offset = intval($matches[1]); $length = $size2 - $offset - 1; } else { $partialContent = "false"; } if ($partialContent == "true") { header('HTTP/1.1 206 Partial Content'); header('Accept-Ranges: bytes'); header('Content-Range: bytes '.$offset. '-'.($offset + $length). '/'.$filesize); } else { header('Accept-Ranges: bytes'); } header("Content-length: ".$size2); $ch = curl_init(); if (isset($_SERVER['HTTP_RANGE'])) { // if the HTTP_RANGE header is set we're dealing with partial content $partialContent = true; // find the requested range // this might be too simplistic, apparently the client can request // multiple ranges, which can become pretty complex, so ignore it for now preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches); $offset = intval($matches[1]); $length = $filesize - $offset - 1; $headers = array( 'Authorization: Bearer '.$access_token, 'Range: bytes='.$offset. '-'.($offset + $length). '' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); }else{ curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Authorization: Bearer ".$access_token )); } curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 222222); curl_setopt($ch, CURLOPT_URL, $v); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_NOBODY, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_exec($ch); //$url = 'http://google.com'; //$content = get_headers($url); //print_r($content); //echo $content; //exit(); ?>