PHP Classes
elePHPant
Icontem

EmbeVi: Embed remote videos and audio in HTML pages

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-03-15 (5 years ago) RSS 2.0 feedStarStarStarStar 69%Total: 3,981 This week: 2All time: 736 This week: 614Up
Version License PHP version Categories  
embevi 1.3GNU General Publi...5.0PHP 5, Content management, Audio, Video
Description Author  

This class can be used to embed remote videos and audio in HTML pages.

It takes the URL of a video or audio page of a remote site and generates HTML for embedding a player for that video or audio clip in another page.

Currently it supports embedding videos and audio clips from:

- YouTube
- 220.ro
- Google video
- Dailymotion
- Trilulilu
- Metacafe
- College Humor
- Cnet
- Glumbert
- Yahoo
- MySpace
- LiveLeak
- Vimeo
- GameTrailers
- UStream
- ClipsHack
- FunnyOrDie
- FileBox
- Last.fm
- Youku
- Rediff
- Rambler.ru
- Tudou
- ku6
- TinyPic
- Libero.it
- ESPN
- NFL
- Web.de
- eksenim.mynet
- RuTube
- LiveVideo
- Vbox7
- Revver
- Current
- dalealplay
- ClipFish.de
- Clip.vn
- LiveStream
- Tangle
- Vidiac
- 5min
- vol.at
- WeGame
- ikbis
- YouMaker
- Snotr
- OneTrueMedia
- clevver
- kewego
- Clipser
- DailyHaHa
- HowCast
- Aniboom
- Bragster
- TeacherTube
- ShredOrDie
- TalentRun
- Autsch.de
- tvbvideo.de
- Clipmoon
- Viddyou
- SpyMac
- YouAre.tv
- MindBites
- JujuNation
- RoofTopComedy
- Hamburg1Video.de
- Caught-on-Video
- Bubblare.se
- Jaycut
- Spotn.de
- TheXvid
- Scivee.tv
- Tvosz
- DailyComedy
- DeutschlandReporter.de
- MotorSportMad
- RheinVideo.de
- SelfCastTV
- MyUbo.sk
- GettyLoad.de
- ClipHost24
- UvuVideo.org
- CroVideos
- QubeTV.tv
- CityTube.de
- ConstantComedy
- Luegmol.ch
- MantouTV
- CloneVideos
- Realitatea.net
- MTV
- RockTube.us
- MyPlay
- 123Video
- 9You
- Blastro
- Cellfish
- Clarin
- ClipJunkie
- ClipLife.jp
- TheDailyShow
- ComedyCentral
- ColbertNation
- CrunchyRoll
- DotSub
- DivShare
- FanDome
- G4TV
- GameSpot
- GameTube
- Gloria.tv
- GotGame
- Guzer
- Izlesene
- Joost
- Justin.tv
- Koreus
- Machinima
- MSNBC
- Mail.ru
- MadnessVideo.net
- Milliyet.tr
- MoFile
- Mpora
- SeeHaHa
- MThai
- OnSmash
- Playlist.com
- RawVegas.tv
- ScreenToaster
- SevenLoad
- ShareView.us
- Smotri
- SouthParkStudios
- Spike
- CBSSports
- Tagtele
- TM-Tube
- TRTube
- Videolog.uol.br
- U-Tube.ru
- Sapo.pt
- Videonuz
- Vidmax
- Vsocial
- Goear
- IJigg
- Jamendo
- JujuNation
- Last.fm
- Nhaccuatui

Innovation Award  
PHP Programming Innovation award winner
October 2009
Winner


Prize: One copy of the Zend Studio
There are many solutions to embed remote video and audio clips into other Web site pages.

This class provides the most extensive solution to embed in your pages video and audio clips from many sites around the world.

Manuel Lemos
Picture of Comanici Paul
Name: Comanici Paul <contact>
Classes: 1 package by
Country: Romania Romania
Age: 30
All time rank: 71113 in Romania Romania
Week rank: 589 Up12 in Romania Romania Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details provided by the author  
       ___________________________________________________________

            EmbeVi Class (Embed From Link)
            Version 1.2 Release day 22 November 2009
       ___________________________________________________________

        Copyright (c) 2009 Comanici Paul (darkyndy)

_______________________

CONTENTS
_______________________

1. Intro
2. Description
3. System Requirements
4. How to use
5. Change Log
6. Contact

_______________________

1. Intro
_______________________

EmbeVi was released first time on 18 May 2009 as a GreaseMonkey extension with the idea Auto Embed Video From Link (supported only video sites).
Durring the development process I've added support for some audio sites and in the and I've released this PHP class.
You can see the list of supported sites at http://www.embevi.com/home#embevi_support

_______________________

2. Description
_______________________

A PHP class that can return the embeded code from a link.
This class can be used to parse a link and will return the embeded code.
With version 1.1 I've added two new methods:
  parseText($text, $keepLink = false, $addHtmlBefore = false, $addHtmlAfter = false) - that can be used to parse plain text
  parseHtml($html, $keepLink = false, $addHtmlBefore = false, $addHtmlAfter = false) - that can be used to parse HTML code
With version 1.2 I've added support for shorten URL's services, now you can embed media if it's behind a shorten URL

_______________________

3. System Requirements
_______________________

PHP 5.x

______________

4. How to use
______________

Please see "test_embevi.php"
Please see "test_embevi_html.php"
Please see "test_embevi_text.php"
Please see "test_embevi_shorturl.php"

______________

5. Change Log
______________

/**
*  Version 1.2
*  - modified regular expression for parseHtml with a more powerful and quick one
*  - added setAcceptShortUrl method, if you call this method then every link will be parsed 
*                                    to check if it's from a list of supported shorted URL's services
*                                    and get's the real link
*  - added unsetAcceptShortUrl method, call this method if you don't want any more to check if a link
*                                      is a short URL and behind it can be video link
*  - default this script will not parse shorten URL's
*  - added a list of 130 short URL's sites that can be parsed
*/

/**
*  Version 1.1
*  - added setGlobalWidth method, now you can set this width and all embedded video will have this width
*  - added unsetGlobalWidth method, unset the width passed with setGlobalWidth method
*  - added setGlobalHeight method, now you can set this height and all embedded video will have this height
*  - added unsetGlobalHeight method, unset the height passed with setGlobalHeight method
*  - added setBeforeHtml method, you can set HTML that will appear before the embedded code
*  - added setAfterHtml method, you can set HTML that will appear after the embedded code
*  - added two optional parameters for the getCode method
*    ->  $addHtmlBefore, if is set to true then before the embedded code it will be added
*        the default before HTML or the before HTML that you passed using method setBeforeHtml
*    ->  $addHtmlAfter, if is set to true then after the embedded code it will be added
*        the default after HTML or the after HTML that you passed using method setAfterHtml
*  - added parseText method, you can now give to this method plain text and EmbeVi will do the job
*    -> this method has 4 parameters:
*      => $text - compulsory parameter, string that will contain text;
*      => $keepLink - optional parameter (default is false), boolean that will say if the link will be kept
*      => $addHtmlBefore - optional parameter (default is false), boolean that will say if you want to add HTML before the embedded code
*      => $addHtmlAfter - optional parameter (default is false), boolean that will say if you want to add HTML after the embedded code
*  - added parseHtml method, you can now give to this method HTML code and EmbeVi will do the job
*    -> same parameters as parseText method 
*/

______________

6. Contact
______________

Please send your suggestions, bug reports and general feedback at darkyndy@gmail.com or you can complete the online form at http://www.embevi.com/contact
Also visit http://www.embevi.com
  Files folder image Files  
File Role Description
Plain text file embevi.class.php Class EmbeVi class
Plain text file license.txt Lic. License file
Accessible without login Plain text file readme Doc. Readme file, please read to understand what EmbeVi stands for
Plain text file test_embevi.php Example PHP script for testing the class functionality
Plain text file test_embevi_html.php Example Script for testing parseHtml method
Plain text file test_embevi_shorturl.php Example sample
Plain text file test_embevi_text.php Example Script for testing parseText method

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,981All time:736
 This week:2This week:614Up
User Ratings User Comments (3)  
 All time
Utility:88%StarStarStarStarStar
Consistency:86%StarStarStarStarStar
Documentation:86%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:69%StarStarStarStar
Rank:226
 
Very Good
1 year ago (Jumelle Eryc)
40%StarStarStar
working 5n thanxs 4 ur code.
4 years ago (chinna)
72%StarStarStarStar
Great to implement a user video referal system, members dont ...
5 years ago (steve olmstead)
80%StarStarStarStarStar