Permalink
Browse files

added config file back

  • Loading branch information...
1 parent 6b2492f commit e45203a306a2b1bff4e7281b4e3b86d6faf77292 @songz songz committed Aug 4, 2012
Showing with 47 additions and 2 deletions.
  1. +41 −0 API_Config.php
  2. +2 −0 OpenTokArchive.php
  3. +1 −0 OpenTokSDK.php
  4. +3 −2 sample/createSession.php
View
@@ -0,0 +1,41 @@
+<?PHP
+
+/**
+* OpenTok PHP Library
+* http://www.tokbox.com/
+*
+* Copyright (c) 2011, TokBox, Inc.
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+* THE SOFTWARE.
+*/
+
+class API_Config {
+
+ // Replace this value with your TokBox API Partner Key
+ const API_KEY = "11421872";
+
+ // Replace this value with your TokBox API Partner Secret
+ const API_SECRET = "296cebc2fc4104cd348016667ffa2a3909ec636f";
+
+ // No need to specify
+ //const API_SERVER = "http://staging.tokbox.com/hl";
+ //const API_SERVER = "https://api.opentok.com/hl";
+
+}
+?>
+
View
@@ -1,5 +1,7 @@
<?php
+require_once 'API_Config.php';
+
class OpenTokArchive {
private $archiveId;
View
@@ -24,6 +24,7 @@
* THE SOFTWARE.
*/
+require_once 'API_Config.php';
require_once 'OpenTokSession.php';
require_once 'OpenTokArchive.php';
View
@@ -24,13 +24,14 @@
* THE SOFTWARE.
*/
+require_once '../API_Config.php';
require_once '../OpenTokSDK.php';
// Creating an OpenTok Object in Staging
-$apiObj = new OpenTokSDK('11421872', '296cebc2fc4104cd348016667ffa2a3909ec636f');
+$apiObj = new OpenTokSDK( API_Config::API_KEY, API_Config::API_SECRET );
// Creating an OpenTok Object in Production
-$apiObj = new OpenTokSDK('11421872', '296cebc2fc4104cd348016667ffa2a3909ec636f', TRUE);
+$apiObj = new OpenTokSDK( API_Config::API_KEY, API_Config::API_SECRET, TRUE);
// Creating Simple Session object, passing IP address to determine closest production server
// Passing IP address to determine closest production server

0 comments on commit e45203a

Please sign in to comment.