SHOW:
|
|
- or go back to the newest paste.
1 | <? | |
2 | function curl($url){ | |
3 | $ch = @curl_init(); | |
4 | curl_setopt($ch, CURLOPT_URL, $url); | |
5 | $head[] = "Connection: keep-alive"; | |
6 | $head[] = "Keep-Alive: 300"; | |
7 | $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; | |
8 | $head[] = "Accept-Language: en-us,en;q=0.5"; | |
9 | 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'); | |
10 | curl_setopt($ch, CURLOPT_HTTPHEADER, $head); | |
11 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
12 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); | |
13 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); | |
14 | curl_setopt($ch, CURLOPT_TIMEOUT, 60); | |
15 | curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); | |
16 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); | |
17 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); | |
18 | $page = curl_exec($ch); | |
19 | curl_close($ch); | |
20 | return $page; | |
21 | } | |
22 | function Drive_direct($curl){ | |
23 | preg_match('/https\:\/\/drive\.google\.com\/file\/d\/(.*)\//', $curl, $id); | |
24 | $get = curl('https://docs.google.com/get_video_info?docid='.$id[1]); | |
25 | $cat = explode('fmt_stream_map=', $get); | |
26 | $cat = explode('&', $cat[1]); | |
27 | $cat = explode(',', urldecode($cat[0])); | |
28 | foreach($cat as $link){ | |
29 | $cat = explode('|', $link); | |
30 | $links = str_replace(array('\u003d', '\u0026','?requiressl=yes&id','transient&app=explorer'), array('=', '&','?app=www.animevshd.com&requiressl=yes&id','transient'), $cat[1]); | |
31 | $xuly_link = preg_replace(["/[^\/]+\.googlevideo\.com/", "/ipbits=\d{2}/", "/&pl=\d{2}/"], ["redirector.googlevideo.com", 'ipbits=32', '&pl=32'],$links); | |
32 | if($cat[0] == 37) {$cur1080p = $xuly_link;} | |
33 | if($cat[0] == 22) {$cur720p = $xuly_link;} | |
34 | if($cat[0] == 59) {$cur480p = $xuly_link;} | |
35 | if($cat[0] == 18) {$cur360p = $xuly_link;} | |
36 | } | |
37 | if(isset($cur1080p)){ | |
38 | $html .= '[{file: "'.$cur1080p.'",label: "1080p", type: "mp4"},'; | |
39 | $html .= '{file: "'.$cur720p.'",label: "720p", type: "mp4", "default": "true"},'; | |
40 | $html .= '{file: "'.$cur480p.'",label: "480p", type: "mp4"},'; | |
41 | $html .= '{file: "'.$cur360p.'",label: "360p", type: "mp4"}]'; | |
42 | } elseif(isset($cur720p)){ | |
43 | $html .= '[{file: "'.$cur720p.'",label: "720p", type: "mp4", "default": "true"},'; | |
44 | $html .= '{file: "'.$cur480p.'",label: "480p", type: "mp4"},'; | |
45 | $html .= '{file: "'.$cur360p.'",label: "360p", type: "mp4"}]'; | |
46 | } elseif(isset($cur480p)){ | |
47 | $html .= '[{file: "'.$cur480p.'",label: "Quality", type: "mp4"},'; | |
48 | $html .= '{file: "'.$cur480p.'",label: "480p", type: "mp4", "default": "true"},'; | |
49 | $html .= '{file: "'.$cur360p.'",label: "360p", type: "mp4"}]'; | |
50 | } elseif(isset($cur360p)){ | |
51 | $html .= '[{file: "'.$cur360p.'",label: "360p", type: "mp4"}]'; | |
52 | } else { | |
53 | $html .= '[{file: "https://cdn.animevshd.com/uploads/error.mp4",label: "Error", type: "video/mp4"}]'; | |
54 | } | |
55 | return $html; | |
56 | } | |
57 | $url = $_REQUEST['url']; | |
58 | if(isset($url)) { | |
59 | echo Drive_direct($url); | |
60 | } | |
61 | ?> |