Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A PHP library for integrating with Limelight CDN
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tests
LimelightCachedRequest.php Fixed the caching so that it would not cache errors.
LimelightChannel.php
LimelightChannelGroup.php Added better method for setting the media nodes.
LimelightConfig.php
LimelightMedia.php
LimelightResource.php
LimelightServer.php Added an upload widget and also removed the pear libs from the Cached…
README.md
index.php Added an upload widget and also removed the pear libs from the Cached…
makefile

README.md

Limelight PHP API

This is a PHP-API library that is used to work with the Limelight CDN in an object oriented way.

Installation:

This library requires the PEAR HTTP_Request2 library to work. Do do this, you must first install PEAR and then install the HTML_Request2 component like the following.

    sudo pear upgrade PEAR
    sudo pear config-set auto_discover 1
    sudo pear install HTTP_Request2

If you wish to run the PHPUnit tests, you will need to have PHPUnit installed.

    sudo pear install pear.phpunit.de/PHPUnit

Configuration:

Within the LimelightConfig.php file, provide the following...

  • organization_id
  • access_key
  • secret

Examples:

To add new media on the Limelight CDN.

  require_once 'LimelightMedia.php';
  $media = new LimelightMedia(array(
    'title' => 'New Media',
    'media_file' => '/path/to/media.mp4'
  ));
  $media->set();

To get media from Limelight CDN.

  require_once 'LimelightMedia.php';
  $media = new LimelightMedia(array(
    'id' => '123456789'
  ));
  print $media->title;

To add a new channel to Limelight.

  require_once 'LimelightChannel.php';
  $channel = new LimelightChannel(array(
    'title' => 'My Channel'
  ));
  $channel->set();

etc, etc...

Something went wrong with that request. Please try again.