https://github.com/jopacicdev/vidinfo
Fetch video info via oembed urls for YT/Vimeo
https://github.com/jopacicdev/vidinfo
oembed php
Last synced: 3 months ago
JSON representation
Fetch video info via oembed urls for YT/Vimeo
- Host: GitHub
- URL: https://github.com/jopacicdev/vidinfo
- Owner: jopacicdev
- Created: 2016-03-14T21:52:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-30T09:31:42.000Z (over 8 years ago)
- Last Synced: 2024-04-18T18:16:02.494Z (about 2 years ago)
- Topics: oembed, php
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VidInfo - Oembed Video Info
[](https://travis-ci.org/jopacicdev/vidinfo)
Vidinfo package takes `$url` parameter and returns video info via oembed urls from the following service providers:
- YouTube
- Vimeo
# Install via Composer
```sh
$ composer require josip/vidinfo
```
### Usage
Use it in static fashion:
```php
\Josip\Vidinfo\Vidinfo::getVideoInfo($url)
```
in order to return array or JSON string, add in the optional second argument:
```php
\Josip\Vidinfo\Vidinfo::getVideoInfo($url, $returnType)
```
The `$returnType` var can be: `object`, `array`, `json`. Falls back to `array`.
License
----
Free as in *free* beer.