« Back to slideshowpro.net
SlideShowPro Help Wiki
Recent changes / Search

SlideShowPro for Flash

SlideShowPro for Lightroom

SlideShowPro Director

SlideShowPro Director Hosting

Extras

Screencasts

SlideShowPro Director
Getting started with the DirectorPHP class
Page last modified by bdaily on September 02, 2008, at 12:08 PM

Before beginning, please note that the DirectorPHP class requires PHP 5 with the cURL module enabled.

To begin, download the DirectorPHP class from the SlideShowPro Director extras page. Inside, you will find a simple example of how the DirectorPHP class can be used to connect and retrieve data and content from your Director installation. You may either edit this sample or start a new project from scratch.

File Structure
Above: File structure

To start a new project, copy the entire classes folder to your current working directory. Then create a new index.php file alongside the classes folder.

Open the index.php file in a code editor and begin a PHP code block. Replace your-api-key and your-api-path with the values you find on your System Info page in Director.

<?php
  include('classes/DirectorPHP.php');
  $director = new Director('your-api-key', 'your-api-path');

  echo('Connected!');
?>

The first line includes the DirectorPHP class and the second creates a new instance of that class using your API information to connect to your Director install.

Now load index.php in a browser. If you see Connected!, you've successfully connected to your Director install. If not, an error will appear explaining what went wrong and how to fix it.

© 2008 Dominey Design Inc. All Rights Reserved.
About | Contact | Privacy policy | License agreements