PHP Server Framework (Deprecated)
We use PHP for the Server-side code. This PHP server is built on CodeIgniter framework and provides an initial template to help you get started working with web page features.
Review the Server-Side CodeThe GitHub repository contains the PHP-based server-side code (CodeIgniter app) that you can use to run the samples. Designed to help you get up and running in very little time, the sample CodeIgniter app is already integrated with the Ooyala PHP SDK (/application/third_party/php-v2-sdk), so there is no need to add anything else. If you already have a server setup, you can adapt the code to your use. Or if you just want to run the code sample, you can clone the repository and copy it to your server. If you clone the repository to your server, you don’t need to implement the PHP framework, as we provide it as part of the code sample.
Where to Find the Code
All of server PHP framework sample code is located in the application directory. To get to this code in our GitHub repository, use the URL: https://github.com/ooyala/code-samples/tree/master/application.The server-side files are structured as follows with the relevant server-side code highlighted:
About the Sample CodeIgniter Framework
As you would expect, the main logic for this sample is in the controller directory. For specific interaction with the Ooyala API you should check the ooyala.php file inside the libraries directory. Since we don't use models in this sample, the models folder only has what comes with default CodeIgniter installation.CodeIgniter is a framework in PHP designed to have as low overhead as possible. It follows an Model-View-Controller (MVC) pattern, where you pass information to the view in the following way:
CodeIgniter follows a URL path such as the following:"base/controller/view/args"
CodeIgniter urls follow a structure like the following:
Currently, this example has the following routes:
|Web_example/web-example||Web site example|
|Web_example/web-example-mobile||Mobile web site example|