修复短视频解析工具

This commit is contained in:
net909
2025-09-20 17:10:47 +08:00
parent ad228a550b
commit f5a6c11dda
19 changed files with 1766 additions and 18 deletions
+19
View File
@@ -143,6 +143,25 @@ function get_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0, $nobod
return $ret;
}
function get_location_url($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$httpheader[] = "Accept: */*";
$httpheader[] = "Accept-Encoding: gzip,deflate,sdch";
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
$httpheader[] = "Connection: close";
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36");
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
$location = curl_getinfo($ch, CURLINFO_REDIRECT_URL);
curl_close($ch);
return $location;
}
function jsonp_decode($jsonp, $assoc = false)
{
$jsonp = trim($jsonp);