Skip to content

Instantly share code, notes, and snippets.

@halidaltuner
Created June 4, 2011 12:56
Show Gist options
  • Save halidaltuner/1007879 to your computer and use it in GitHub Desktop.
Save halidaltuner/1007879 to your computer and use it in GitHub Desktop.
youtube-dl youtube video grabber
<form method="post">
<input type="text" name="url" value="" style="width: 300px">
<input type="submit" value="getir">
</form>
<?php
ob_start();
if(isset($_POST['url']))
{
$vURL = $_POST["url"];
exec("youtube-dl -o video/\"%(id)s\".flv $vURL");
preg_match('![?&]{1}v=([^&]+)!', $vURL . '&', $m);
echo "<a href='video/".$m[1].".flv'>video tikla izle</a>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment