noc-med / youtube-dl-php
There is no license information available for the latest version (dev-master) of this package.
PHP library to download video
dev-master
2015-07-04 16:54 UTC
Requires
- symfony/process: >=2.3
This package is not auto-updated.
Last update: 2025-02-11 04:09:46 UTC
README
This library is a PHP implementation of Youtube-dl for downloading video from Youtube and other sites.
Installation
Youtube-dl has must be installed first.
Installation using Composer:
{ "require": { "noc-med/youtube-dl-php": "dev-master" } }
##Examples
###Download
use Youtubedl\Youtubedl; $youtubedl=new Youtubedl(); $youtubedl->getFilesystemOption() ->setOutput("\"/tmp/%(title)s.%(ext)s\""); $youtubedl->download('BaW_jenozKc');
###Multiple Download
use Youtubedl\Youtubedl; $youtubedl=new Youtubedl(); $youtubedl->getFilesystemOption() ->setOutput("\"/tmp/%(title)s.%(ext)s\""); $youtubedl->download(array('BaW_jenozKc','dOibtqWo6z4'));
###Extractor List
use Youtubedl\Youtubedl; $youtubedl=new Youtubedl(); $youtubedl->getOption() ->getExtractors(); var_dump($youtubedl->execute());
###Extractor Descriptions
use Youtubedl\Youtubedl; $youtubedl=new Youtubedl(); $youtubedl->getOption() ->getExtractorDescriptions(); var_dump($youtubedl->execute());
###User Agent
use Youtubedl\Youtubedl; $youtubedl=new Youtubedl(); $youtubedl->getOption() ->setUserAgent('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14') ->getUserAgent(); var_dump($youtubedl->execute());