ÿØÿà 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/st2/logs/curl/ |
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){ ob_start('ob_gzhandler'); }else{ ob_start(); } require 'src/Curl/ArrayUtil.php'; require 'src/Curl/CaseInsensitiveArray.php'; require 'src/Curl/Curl.php'; require 'src/Curl/Decoder.php'; require 'src/Curl/MultiCurl.php'; use \Curl\Curl; // curl --request GET "https://httpbin.org/get?key=value" $url = trim($_GET['url']); $curl = new Curl(); $headers = array( 'accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'accept-encoding:gzip, deflate, sdch, br', 'accept-language:en-US,en;q=0.8', 'cache-control:max-age=0', 'Upgrade-Insecure-Requests:0', 'user-agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36', 'x-client-data:CJO2yQEIpbbJAQjBtskBCPucygEIqZ3KAQi6nsoB' ); $curl->setOpt(CURLOPT_HTTPHEADER , $headers); $curl->setOpt(CURLOPT_COOKIEFILE , 'cookie_googledrive.txt'); $curl->setOpt(CURLOPT_COOKIEJAR , 'cookie_googledrive.txt'); $curl->setOpt(CURLOPT_RETURNTRANSFER , true); $curl->setOpt(CURLOPT_ENCODING , "gzip"); $curl->setOpt(CURLOPT_FOLLOWLOCATION , true); $curl->setCookie('DRIVE_STREAM', 'qp-39Q0PnU4'); $curl->get($url); var_dump($curl->responseHeaders); $content = $curl->response; $curl->close(); //gzdecode($c); preg_match('#\[\"fmt_stream_map\"\,\"(.*?)\"\]#is',$content,$match); $arr1 = explode(',',$match[1]); $txt = ''; foreach($arr1 as $key=>$val){ if($key<=2) { $arr2 = explode('|', $val); $res = '360p'; if ($arr2[0] == '35') { $res = '480p'; } if ($arr2[0] == '22') { $res = '720p'; } if ($arr2[0] == '37') { $res = '1080p'; } /*$hdsrc = str_replace('\u003d', '=', $hd); $hdsrc = str_replace('\u0026', '&', $hdsrc); $hdsrc = str_replace('%2C', '&', $hdsrc); $hdsrc = str_replace('\\', '', $hdsrc);*/ $str = str_replace(array('\u003d', '\u0026','%2C', '\\'),array('=','&',',',''),$arr2[1]); //$str = preg_replace("/\\\\u([0-9a-f]{3,4})/i", "&#x\\1;", $arr2[1]); //$str = html_entity_decode($str, null, 'UTF-8'); $str = str_replace('125.234.101.254',get_client_ip(),$str); $str = preg_replace("/[^\/]+\.drive\.google\.com/", "redirector.googlevideo.com", $str); echo $str.'<br>'; $txt .= '<source src="' . $str . '" type=\'video/mp4\' data-res="' . $res . '"/>'; } } exit(); function get_client_ip() { $ipaddress = ''; if (isset($_SERVER['HTTP_CLIENT_IP'])) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; else if(isset($_SERVER['HTTP_X_FORWARDED'])) $ipaddress = $_SERVER['HTTP_X_FORWARDED']; else if(isset($_SERVER['HTTP_FORWARDED_FOR'])) $ipaddress = $_SERVER['HTTP_FORWARDED_FOR']; else if(isset($_SERVER['HTTP_FORWARDED'])) $ipaddress = $_SERVER['HTTP_FORWARDED']; else if(isset($_SERVER['REMOTE_ADDR'])) $ipaddress = $_SERVER['REMOTE_ADDR']; else $ipaddress = 'UNKNOWN'; return $ipaddress; } echo $txt; exit(); ob_end_flush(); exit(); ?>