WorldWideScripts.net Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Images and Media

PHP Video Plugin

— Add-On to WorldWideScripts.net

Subscribe to our feed to stay up to date!

New! Follow us as you want it!


PHP Video Plugin - CodeCanyon Item for Sale

Ads

Ad: Bluehost hosting

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('http://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('http://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('http://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: http://photography.evosia.com/2010/08/13/under-the-milky-way-in-joshua-tree-national-park/

Website: http://www.evosia.com
Facebook:http://www.facebook.com/evosiastudios
Twitter: http://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

Mobile url: http://vimeo.com/m/#/14173983
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: http://vimeo.com/evosia


More Files From the PHP Plugin Suite

Bitly

Image Plugin

Map + Weather Plugin

Twitter Plugin

Weather Plugin


pose css


Download
Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers

Properties

Created:
29 January 11

Last Update:
N/A

High Resolution:
No

Compatible Browsers:
IE6, IE7, IE8, Safari, Opera

Files Included:
PHP

Software Framework:
CodeIgniter

Software Version:
PHP 5.3

Keywords

eCommerce, eCommerce, All Items, codeigniter, php, video, vimeo, widgets, youtube