public function __construct($accessKey, $secretKey, $host = "http://services.stupeflix.com", $service = 'stupeflix-1.0', $debug = false) { if ($host[strlen($host) - 1] == "/") { $host = substr($host, 0, strlen($host) - 1); } $this->accessKey = $accessKey; $this->secretKey = $secretKey; $this->base_url = $host . '/' . $service; $this->service = $service; $this->debug = $debug; // Currently there is only the Marker parameter (used for partial enumeration) self::$parametersToAdd = array(StupeflixBase::MARKER_PARAMETER, StupeflixBase::MAXKEYS_PARAMETER); }
// Require the stupeflix client library require_once 'stupeflix.php'; // Includes the access key and secret key definition : YOU SHOULD SETUP THIS FIRST require_once 'key.php'; // Includes the access key and secret key definition : YOU SHOULD SETUP THIS FIRST require_once 'conf.php'; // Report all errors except E_NOTICE // This is intended only for debugging purpose, not production ! error_reporting(E_ALL); if (stupeflixAccessKey == 'PUT-YOUR-ACCESS-KEY-HERE') { die("ERROR : Please fill in key information in key.php\n"); } try { // Create the helper class $debug = False; $stupeflix = new Stupeflix(stupeflixAccessKey, stupeflixSecretKey, stupeflixHost, $service = 'stupeflix-1.0', $debug); // If you plan to offer the service to your own users, // you can set the user variable to your user id. // Otherwise, you can always keep the same name $user = "******"; // Each user can have different projects : // select the name of the project to test $resource = "resource"; // name of the xml definition file $definitionFilename = "movie.xml"; // These are meta information that can will be used while uploading to Youtube / Dailymotion for example $metaDict = array("title" => "This is my test video", "description" => "Describe here your video.", "tags" => "add,your,tags", "channels" => "Tech", "acl" => "public"); $meta = new StupeflixMeta($metaDict); if (youtubeLogin != "") { // Create sample youtube information $tags = implode(",", array("these", "are", "my", "tags"));