PHP Classes

PHP Youtube and Vimeo Video Downloader Script: Download YouTube or Vimeo videos

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 1,842 All time: 2,137 This week: 36Up
Version License PHP version Categories
video-download 1.0.0GNU General Publi...5PHP 5, Files and Folders, Web services, V...
Description 

Author

This package can download YouTube or Vimeo videos.

It takes as parameter the URL of a video page on YouTube or Video sites.

The class determines the identifier of the video and the video download URL.

It returns the URL to download the video file as result.

Innovation Award
PHP Programming Innovation award nominee
January 2017
Number 2


Prize: PhpStorm IDE 1 year individual subscription
YouTube is the most popular video hosting site, but Vimeo is also used by many video publishers.

Many users would like to be able to download videos from these sites and watch them offline, but the sites do not provide a good solution for that.

This package provides means for downloading videos from either YouTube or Vimeo using PHP scripts.

Manuel Lemos
Picture of Ssaurz Acharya
Name: Ssaurz Acharya <contact>
Classes: 3 packages by
Country: Australia Australia
Age: ???
All time rank: 151323 in Australia Australia
Week rank: 215 Up3 in Australia Australia Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
include_once 'YouTubeDownloader.php';
include_once
'VimeoDownloader.php';
include_once
'LinkHandler.php';

$url = "https://www.youtube.com/watch?v=oeCihv9A3ac";
$handler = new LinkHandler();
$downloader = $handler->getDownloader($url);
$downloader->setUrl($url);
if(
$downloader->hasVideo())
{
   
print_r($downloader->getVideoDownloadLink());
}


Details

Youtube-Vimeo-Video-Downloader-Script

This is a script done by me for Youtube and Vimeo video downloader.

Below is the given example to extract the download link of Youtube and Vimeo. After you got the downlad link you can create your own downloader.

include_once 'YouTubeDownloader.php';
include_once 'VimeoDownloader.php';
include_once 'LinkHandler.php';
 
$url = "https://www.youtube.com/watch?v=oeCihv9A3ac";
$handler = new LinkHandler();
$downloader = $handler->getDownloader($url);
$downloader->setUrl($url);
if($downloader->hasVideo())
{
    print_r($downloader->getVideoDownloadLink());
}

  Files folder image Files (6)  
File Role Description
Files folder imageDownloader (4 files)
Files folder imageexample (1 file)
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (6)  /  Downloader  
File Role Description
  Plain text file Downloader.php Class Class source
  Plain text file LinkHandler.php Class Class source
  Plain text file VimeoDownloader.php Class Class source
  Plain text file YouTubeDownloader.php Class Class source

  Files folder image Files (6)  /  example  
File Role Description
  Accessible without login Plain text file example.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,842
This week:0
All time:2,137
This week:36Up
 User Ratings  
 
 All time
Utility:95%StarStarStarStarStar
Consistency:90%StarStarStarStarStar
Documentation:80%StarStarStarStarStar
Examples:80%StarStarStarStarStar
Tests:-
Videos:-
Overall:72%StarStarStarStar
Rank:167