website/tesses.cf/apps/tytd/download.php

21 lines
556 B
PHP
Executable File

<?php
if(isset($_POST['url']) && !isset($_POST['dlvidtodev']))
{
exec("curl 10.137.42.142:3252/tytd/api/AddItem/".$_POST['url']);
header('Location: '.$_POST['site']);
}
else
{
$url = $_POST['url'];
$youtube_id = $url;
if(strlen($youtube_id) != 11)
{
preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match);
$youtube_id = $match[1];
}
header('Location: '.'http://stark-shelf-08981.herokuapp.com/Grabber/Video/'.$youtube_id);
}
?>