
PHP Video Plugin

Description
This video plugin can take a YouTube or Vimeo url and return an array of info such as a thumbnail image, title, length, tags, views, etc. It can even automatically embed the video into the page. It uses the newer iframe embed method which adds html5 support to both YouTube & Vimeo video which means they can be play on mobile devices such as iPhone and Android.
Requires PHP 5.2+ with JSON support.
Embed Video
Embedding a video is super easy. Just input a YouTube or Vimeo url and optional dimensions like so:
echo $video->embed('https://www.youtube.com/watch?v=AZW9NYX6JZA', '630', '350');
Result
Video Info
To pull the info for a video all you need to do is pass the url of the video you’re interested in. The function will automatically determine the type and return an array of relevant data.
$info = $video->info('https://www.youtube.com/watch?v=AZW9NYX6JZA');
// Information returned from a YouTube link
$info['video_id']
$info['published']
$info['updated']
$info['title']
$info['info']
$info['user']
$info['comments']
$info['category']
$info['duration']
$info['category']
$info['tags']
$info['thumb_1']
$info['thumb_2']
$info['thumb_3']
$info['thumb_large']
$info['favorites']
$info['views']
YouTube Thumbnails
YouTube Data
Video id: AZW9NYX6JZA Published date: 2009-04-09T18:59:13.000Z Last updated: 2011-01-26T09:01:46.000Z Title: St Vincent – “Actor Out Of Work” Info: Check out the first single “Actor Out Of Work” from St. Vincent’s newest album Actor. Buy her magnificent new album here: beggarsgroupusa.com User: 4ADRecords Comments: 574 Category: Check out the first single “Actor Out Of Work” from St. Vincent’s newest album Actor. Buy her magnificent new album here: beggarsgroupusa.com Duration: 150 Category: Check out the first single “Actor Out Of Work” from St. Vincent’s newest album Actor. Buy her magnificent new album here: beggarsgroupusa.com Tags: St. Vincent, Actor Out Of Work, Actor, 4AD, Sufjan Stevens, Polyphonic Spree Favorited: 4219 Views: 483931
While the function will automatically determine if your video is from YouTube or Vimeo, the respective API’s each return slightly different data. We’ve already seen what info you can get back from a YouTube video, now here’s an example of the data returned from Vimeo:
$info = $video->info('https://vimeo.com/14173983');
// Information return from a Vimeo link
$info['video_id']
$info['status']
$info['title']
$info['info']
$info['mobile_url']
$info['thumb_small']
$info['thumb_med']
$info['thumb_large']
$info['user']
$info['user_url']
$info['user_thumb_small']
$info['user_thumb_medium']
$info['user_thumb_large']
$info['user_thumb_huge']
$info['likes']
$info['plays']
$info['comments']
$info['duration']
$info['width']
$info['height']
$info['tags']
$info['embed']
Vimeo Thumbnails
Vimeo Data
Video id: 14173983 Title: Joshua Tree Under the Milky Way
Info: Timelapse video of the Perseid Meteor Shower and the galactic core of the Milky Way as seen from Joshua Tree National Park.
These were taken between August 12 and August 15, 2010.
For more photos and words:
Website: https://www.evosia.com Facebook:https://www.facebook.com/evosiastudios Twitter: https://twitter.com/evosia
Gear: 5D Mk II, EF 16-35mm L. Settings: f/2.8, 6400 ISO, 20 second exposures.
Music is Samskeyti by Sigur Ros Likes: 2501 Plays: 572653 Comments: 261 Duration: 65 Width: 640 Height: 360 Tags: Perseid Meteor Shower, Milky Way, timelapse, joshua tree national park, canon 5d Mk II
Vimeo User Info
User: Henry Jun Wah Lee User url:More Files From the PHP Plugin Suite
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
Perceptle
Perceptle is a daily browser-based game that challenges you to test your sensory intuition through five quick estimation and rhythm-based rounds.
Other · 3,205 views · 15 clicksOther · Week 47 · 3,205 views · 15 clicks
🥈
Free LinkedIn Likes From Real
Get free LinkedIn likes on your posts from real members who react by hand. No
SaaS · 3,323 views · 17 clicksSaaS · Week 47 · 3,323 views · 17 clicks
🥉
STOP GUESSING WHAT TO POST
AI that learns your brand voice and builds a month of consistent, on-brand social content: carousels, posts and hooks that sound like you, not like everyone else's AI.
SaaS · 10,823 views · 79 clicksSaaS · Week 47 · 10,823 views · 79 clicks
#4
aaas.market
407 reliable micro tools for solo founders, marketers and creators. They work in your browser
SaaS · 3,224 views · 7 clicksSaaS · Week 47 · 3,224 views · 7 clicks