PHP code example of flipminds / gotowebinar
1. Go to this page and download the library: Download flipminds/gotowebinar library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
flipminds / gotowebinar example snippets
use FlipMinds\GotoWebinar\GotoWebinar;
$credentials = [
'username' => ''
'password' => ''
'consumerKey' => ''
];
$gtw = new GotoWebinar($credentials);
$webinars = $gtw->getUpcoming();
$key = ''
foreach($webinars as $webinar) {
if (!$key) $key = $webinar->webinarKey;
}
$result = $gtw->createRegistrant($key, 'firstname','lastname','email);
print_r($result);
// $auth = getfromcache()
$gtw = new GotoWebinar($credentials, $auth); // see Above
$gtw->setAuthCallback(function($auth) {
// save $auth to cache
});