https://github.com/optixsolutions/youtube-url-parser
https://github.com/optixsolutions/youtube-url-parser
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/optixsolutions/youtube-url-parser
- Owner: optixsolutions
- License: mit
- Created: 2018-10-15T16:08:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T11:46:24.000Z (almost 8 years ago)
- Last Synced: 2026-04-08T20:53:46.935Z (4 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Youtube Url Parser
## Installation
```bash
composer require optix/youtube-url-parser
```
## Usage
```php
use Optix\YoutubeUrlParser\UrlParser;
$parser = new UrlParser('https://www.youtube.com/watch?v=e2SUGfXVy4A');
$parser->isValid(); // true
$parser->getVideoId(); // e2SUGfXVy4A
$parser->getEmbedUrl(); // https://www.youtube.com/embed/e2SUGfXVy4A
```
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.