Skip to content

Commit 8643ead

Browse files
author
You2php
authored
修复了部分错误
1 parent cf2631e commit 8643ead

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

vs.php

+29-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,35 @@
33
@ignore_user_abort(0);
44
@set_time_limit(0);
55
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+
735
$yt=new YouTubeDownloader();
836
$u="https://www.youtube.com/watch?v=".$_GET['vv'];
937
$links=$yt->getDownloadLinks($u);

0 commit comments

Comments
 (0)