Fork me on GitHub

Panorama-PHP by frandieguez

Wrapper PHP class to fetch information about videos on online services in a standarized way. It is an easy way to obtain a few basics about a video only through its url.

What's this?

With this wrapper class you can fetch information from multiple video services in a uniformed and unique way. You only need the URL from the video service you are going to use.

A quick example

To include this video in a post you only need to know the url of the video. Panorama-PHP API will handle all the background connections to supported video services for getting all the video information:

$video = new \Panorama\Video("")

$video->getTitle() => "paradon del portero"
$video->getThumbnail() => ""
$video->getEmbedUrl() => ""
$video->getEmbedHTML()(width, height) => "<object> [...]</object>"
$video->getFLV() => "http://...flv"
# or all together :)
$video->getVideoDetails(width, height) => {
                                        'title' => ...,
                                        'thumbnail' => ...,
                                        'embed_url' => ...,
                                        'embed_html' => ...,
                                        'flv' => ...


  1. Put Panorama library in one of your include_path folders
  2. Make sure to use an PSR-0-compatible autoloader.


This library depends on

  1. Zend GData for access the Youtube API.
  2. Obviosly PHP 5.3, you have to use namespaces and some other goodies of 5.3 version.

Please don't ask for PHP < 5.3 support, you shouldn't use PHP 5.2 at all.

How to use it!

The idea is make it as simple as possible. For a URL video like

$video = new \Panorama\Video("")

Then you have methods to know information about the video in your application.

Supported services

At this moment we support the following video services:

Broken services

These services were included in this API but, due changes in their website, don't work anymore. Any patch for fixing them are welcome. ;)

If you detect new broken services by running the tests please let me know.

We are always open to incude new services.


Fran Diéguez (


Fran Diéguez (


You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://