PHP Classes


Recommend this page to a friend!
  Classes of Zakir Hyder  >  Citrix GoToWebinar PHP Library  >  >  Download  
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Citrix GoToWebinar PHP Library
Manage Webinars using GotoWebinar Citrix API
Author: By
Last change: delete registrant function added
Date: 1 year ago
Size: 4,141 bytes


Class file image Download
Citrix's GoToWebinar PHP Library

The GoToWebinar PHP Library is typically used to perform operations like create registrant of webinar, get the login url, list webinars etc.  the PHP Library greatly simplifies the process of authentication and authorizing users for your app. This lib needs JSON and  CURL PHP extension.

You will need an API key to initialize the Library, which you can obtain from Apply for Developer Key on Be sure to check GoToWebinar as Product API. Then you will see the API key on If you are not registered, first register yourself on here Then Apply for Developer Key. Be sure to check GoToWebinar as Product API. Then you will see the API key on 

Installing and Initializing

To install the PHP Library, extract the downloaded files and copy the citrix.php from the directory to a directory on the server where you will host your app. Then, just include citrix.php wherever you want to use the PHP Library. 

You will need an app id to initialize the Library, which you can obtain from your developer profile

First include the citrix.php in you code. You use the Library by instantiating a new Facebook object with, at a minimum, your app id and app secret:

include "citrix.php";

    $citrix = new Citrix('API Key');
    $organizer_key = $citrix->get_organizer_key();


To get current Organizer Key

    $organizer_key = $citrix->get_organizer_key();

If Organizer Key is empty, create login url. If not parameter is passed then redirect url will be the current url. If you want to redirect to another url, pass the url on the function. But remember the redirect url must be on the same domain that you created the app for.

    	$url = $citrix->auth_citrixonline();
    	echo "<script type='text/javascript'>top.location.href = '$url';</script>";

To Get access token 

    $url = $citrix->get_access_token();

I will suggest to save the user's access token and organizer key in Database. So that user does not have to authorize your app every time they user you app/website.

To load access token and organizer key


Get list of webinars 

    $webinars = $citrix->citrixonline_get_list_of_webinars() ;

If you want to get previous webinars along with future webinars pass 1 as parmeter ex citrixonline_get_list_of_webinars(1).

To create registrant of a webinar - you have to provide webinar id, first name, last name and email.

    	$response = $citrix->citrixonline_create_registrant_of_webinar('webinar id', $data = array('first_name' => 'First Name', 'last_name' => 'Lastnmae', 'email'=>'')) ;
    }catch (Exception $e) {	

To get registrants of a webinar

    	$webinars = $citrix->get_registrants_of_webinars('webinar id') ;
    }catch (Exception $e) {	

To delete registrant of a webinar

        $citrix->citrixonline_delete_registrant_of_webinar('webinar id', 'registrant id') ;
    }catch (Exception $e) { 

$citrix->pr() is Print_r convenience function. I have created two example files - login.php and api example.php. login.php shows you how to the lib to authorize user with your app. example.php show all api calls.

## Contact

Follow []( on Facebook 

### Creators

[Zakir Hyder](  

## License

Citrix's GoToWebinar PHP Library is available under the MIT license. See the LICENSE file for more info.