PHPackages                             mascame/video-checker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mascame/video-checker

ActiveLibrary

mascame/video-checker
=====================

Check if a video is available online.

2.3(10y ago)04.7k1MITPHP

Since Oct 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/marcmascarell/video-checker)[ Packagist](https://packagist.org/packages/mascame/video-checker)[ Docs](https://github.com/marcmascarell/video-checker)[ RSS](/packages/mascame-video-checker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

Video Checker
=============

[](#video-checker)

[![Latest Stable Version](https://camo.githubusercontent.com/27421694b4dc5984959189b059c44b43377b4df281878577dd358e6a78d03d11/68747470733a2f2f706f7365722e707567782e6f72672f6d617363616d652f766964656f2d636865636b65722f762f737461626c652e737667)](https://packagist.org/packages/mascame/video-checker)[![License](https://camo.githubusercontent.com/faa36cce39e05dc160f5243730d5de71ff7c787c864fbebb36afb457a32a46f6/68747470733a2f2f706f7365722e707567782e6f72672f6d617363616d652f766964656f2d636865636b65722f6c6963656e73652e737667)](https://packagist.org/packages/mascame/video-checker)

Check if a video is available online.

Installation
------------

[](#installation)

Require this package in your composer.json and run composer update:

```
"mascame/video-checker": "2.*"

```

Usage
-----

[](#usage)

Just use `$provider->check(videoId)` with the provider you want

```
$youtubeProvider = new Mascame\VideoChecker\YoutubeProvider();

var_dump($youtubeProvider->check('C7OfO6r_5m0')); // true
var_dump($youtubeProvider->check('CWO3Tuo35-o')); // false

// Check if a video is disponible with API
$youtubeProviderWithAPI = new Mascame\VideoChecker\YoutubeProvider('MY_API_KEY');

var_dump($youtubeProviderWithAPI->check('GOHXRe9o_Ls')); //false

// Check if a video is disponible on a certain country
var_dump($youtubeProviderWithAPI->check('GOHXRe9o_Ls', 'ES')); // false
var_dump($youtubeProviderWithAPI->check('CWO3Tuo35-o', 'IT')); // true

// As array (youtube has an API limit of 50 ids per call)
var_dump($youtubeProviderWithAPI->check(['CWO3Tuo35-o', 'GOHXRe9o_Ls'], 'ES')); // ['CWO3Tuo35-o' => true, 'GOHXRe9o_Ls' => false]

$vimeoProvider = new Mascame\VideoChecker\VimeoProvider();

var_dump($vimeoProvider->check('31161781')); // true
var_dump($vimeoProvider->check('34134308a')); // false

$dailymotionProvider = new Mascame\VideoChecker\DailymotionProvider();

var_dump($dailymotionProvider->check('x38rpxc')); // true
var_dump($dailymotionProvider->check('x38rpxc3232')); // false

// As array
var_dump($dailymotionProvider->check(['x38rpxc', 'x38rpxc3232'])); // ['x38rpxc' => true, 'x38rpxc3232' => false]
```

Running tests
-------------

[](#running-tests)

Install composer dependencies in development mode

`composer update --dev`

`vendor/bin/phpunit tests/TestVideoChecker.php`

Changelog
---------

[](#changelog)

### 2.3

[](#23)

- Youtube Provider: Throw exception if API call fails or has errors (to avoid false negatives)

### 2.2

[](#22)

- Fixes stored Ids when was not in API response items
- Youtube Provider: get total API calls

### 2.1

[](#21)

- Allows array as parameter in 'check' method (output will be an array \['video-id' =&gt; bool, 'video-id2' =&gt; bool\])
- Youtube Provider: Using ids parameter as array will avoid unneeded API calls (and dont waste quota)

### 2.0

[](#20)

- Allow Youtube API check without country specified
- Simplified API
- Updated tests

### 1.2

[](#12)

- Added API key injection via constructor for YoutubeProvider

### 1.1

[](#11)

- Added checkByCountry for YoutubeProvider

### 1.0

[](#10)

- Added Youtube, Vimeo &amp; Dailymotion providers

Support
-------

[](#support)

If you want to give your opinion, you can send me an [email](mailto:marcmascarell@gmail.com), comment the project directly (if you want to contribute with information or resources) or fork the project and make a pull request.

Also I will be grateful if you want to make a donation, this project hasn't got a death date and it wants to be improved constantly:

[![Website Button](https://camo.githubusercontent.com/94fb13462dc68c7036a8f6271bb02869d7ade2cc9ca74f5e951af74701898a22/687474703a2f2f7777772e7261686d656e76657273616e642e636f6d2f696d616765732f70617970616c5f6c6f676f5f6b6c65696e2e676966 "Donate!")](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=marcmascarell%40gmail%2ecom&lc=US&item_name=Arrayer%20Development&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest&amount=5 "Contribute to the project")

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~43 days

Total

11

Last Release

3660d ago

Major Versions

1.6 → 2.02016-02-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/9570e08dbb97ee61a22ae78624fd6b86ce62e0a89120fe40b5bde23d4a22eb6d?d=identicon)[marcmascarell](/maintainers/marcmascarell)

---

Top Contributors

[![marcmascarell](https://avatars.githubusercontent.com/u/642299?v=4)](https://github.com/marcmascarell "marcmascarell (17 commits)")[![dtarda](https://avatars.githubusercontent.com/u/2777904?v=4)](https://github.com/dtarda "dtarda (1 commits)")

---

Tags

video checkonline video checkeryoutube checkervimeo checker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mascame-video-checker/health.svg)

```
[![Health](https://phpackages.com/badges/mascame-video-checker/health.svg)](https://phpackages.com/packages/mascame-video-checker)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
