Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto integrate of youtube-dl on server #13623

Closed
kiranbulley opened this issue Jul 10, 2017 · 2 comments
Closed

auto integrate of youtube-dl on server #13623

kiranbulley opened this issue Jul 10, 2017 · 2 comments

Comments

@kiranbulley
Copy link

@kiranbulley kiranbulley commented Jul 10, 2017

i am developing a package to editing video and i need to integrate youtube-dl library with package installation. package developed in PHP. can we do auto integration of library on server

@siddht4
Copy link

@siddht4 siddht4 commented Jul 10, 2017

index.php.txt
this can be done simply calling exec function in php. sample code :

<?php
//$out=shell_exec("youtube-dl");
//$out=exec("youtube-dl -version");
//var_dump($out);
$url = 'https://www.youtube.com/watch?v=GMuZdN84PJg'; //any url 

//$url='-v';
$cmd = 'youtube-dl -o "/home/siddht1/div/tmp/%(id)s.%(ext)s" ' . escapeshellarg($url);
exec($cmd, $output, $ret);
echo 'output: ';
var_export($output);
echo "\nret: ";
var_export($ret);

print_r(shell_exec());
?> 

other projects based on similar ideas are https://github.com/labzone/Youtube-dl-php ,https://github.com/norkunas/youtube-dl-php.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 10, 2017

Thanks @siddht1. For further discussions, please move to #152.

@yan12125 yan12125 closed this Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.