tytdarchive/www/have.php

28 lines
768 B
PHP
Raw Normal View History

2024-06-22 04:03:20 +00:00
<?php
$id=$_GET["v"];
include("vars.php");
header("Content-Type: application/json");
$res = "PreMuxed";
$exists = true;
if(isset($_GET["res"]))
{
$myRes = $_GET["res"];
if($myRes == "PreMuxed" || $myRes == "Mux" || $myRes == "AudioOnly" || $myRes == "VideoOnly")
{
$res = $myRes;
}
}
$path = $res."/".$_GET['v'];
if(!file_exists($server_path.$path.".mp4") && !file_exists($server_path.$path.".mkv") && !file_exists($server_path.$path.".webm") && !file_exists($server_path.$path.".3gpp") && !file_exists($server_path.$path.".Tesses.YouTubeDownloader.BestStreamInfo"))
{
$exists=false;
}
header("Content-Type: application/json");
echo $exists ? "true" : "false";
?>