Source for file ktws_eg_anonymous.php

Documentation is available at ktws_eg_anonymous.php

  1. <?
  2.  
  3. /**
  4.  *
  5.  * Demonstrates how to create an anonymous session.
  6.  * @license http://www.knowledgetree.com/KPL KnowledgeTree Public License Version 1.1
  7.  * @package KTWSAPI
  8.  */
  9.  
  10. /*
  11.  *
  12.  * The contents of this file are subject to the KnowledgeTree Public
  13.  * License Version 1.1 ("License"); You may not use this file except in
  14.  * compliance with the License. You may obtain a copy of the License at
  15.  * http://www.knowledgetree.com/KPL
  16.  * 
  17.  * Software distributed under the License is distributed on an "AS IS"
  18.  * basis,
  19.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  20.  * for the specific language governing rights and limitations under the
  21.  * License.
  22.  * 
  23.  * The Original Code is: KnowledgeTree Open Source
  24.  * 
  25.  * The Initial Developer of the Original Code is The Jam Warehouse Software
  26.  * (Pty) Ltd, trading as KnowledgeTree.
  27.  * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright
  28.  * (C) 2007 The Jam Warehouse Software (Pty) Ltd;
  29.  * All Rights Reserved.
  30.  *
  31.  */
  32.  
  33. require_once('../ktwsapi.inc.php');
  34.  
  35. $ktapi new KTWSAPI(KTWebService_WSDL);
  36.  
  37. $response $ktapi->start_anonymous_session();
  38. if (PEAR::isError($response))
  39. {
  40.     print $response->getMessage();
  41.     exit;
  42. }
  43.  
  44. // do something
  45.  
  46. $root=$ktapi->get_root_folder();
  47.  
  48. // when done, logout
  49.  
  50.  
  51. $ktapi->logout();
  52.  
  53. ?>

Documentation generated on Sun, 22 Apr 2007 02:31:00 +0200 by phpDocumentor 1.3.2