|
3 | 3 | @ignore_user_abort(0);
|
4 | 4 | @set_time_limit(0);
|
5 | 5 | include_once('./YouTubeDownloader.php');
|
6 |
| -include("./lib.php"); |
| 6 | + |
| 7 | +function strencode($string,$key='09KxDsIIe|+]8Fo{YP<l+3!y#>a$;^PzFpsxS9&d;!l;~M>2?N7G}`@?UJ@{FDI') { |
| 8 | + $key = sha1($key); |
| 9 | + $strLen = strlen($string); |
| 10 | + $keyLen = strlen($key); |
| 11 | + for ($i = 0; $i < $strLen; $i++) { |
| 12 | + $ordStr = ord(substr($string,$i,1)); |
| 13 | + if (@$j == $keyLen) { $j = 0; } |
| 14 | + $ordKey = ord(substr($key,$j,1)); |
| 15 | + @$j++; |
| 16 | + @$hash .= strrev(base_convert(dechex($ordStr + $ordKey),16,36)); |
| 17 | + } |
| 18 | + return 'Urls://'.$hash; |
| 19 | +} |
| 20 | +function strdecode($string,$key='09KxDsIIe|+]8Fo{YP<l+3!y#>a$;^PzFpsxS9&d;!l;~M>2?N7G}`@?UJ@{FDI') { |
| 21 | + $string= ltrim($string, 'Urls://'); |
| 22 | + $key = sha1($key); |
| 23 | + $strLen = strlen($string); |
| 24 | + $keyLen = strlen($key); |
| 25 | + for ($i = 0; $i < $strLen; $i+=2) { |
| 26 | + $ordStr = hexdec(base_convert(strrev(substr($string,$i,2)),36,16)); |
| 27 | + if (@$j == $keyLen) { @$j = 0; } |
| 28 | + $ordKey = ord(substr($key,@$j,1)); |
| 29 | + @$j++; |
| 30 | + @$hash .= chr($ordStr - $ordKey); |
| 31 | + } |
| 32 | + return $hash; |
| 33 | +} |
| 34 | + |
7 | 35 | $yt=new YouTubeDownloader();
|
8 | 36 | $u="https://www.youtube.com/watch?v=".$_GET['vv'];
|
9 | 37 | $links=$yt->getDownloadLinks($u);
|
|
0 commit comments