PHP code example of learnosity / learnosity-sdk-php

1. Go to this page and download the library: Download learnosity/learnosity-sdk-php 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/ */

    

learnosity / learnosity-sdk-php example snippets

 php

    
bash
   git clone https://github.com/Learnosity/learnosity-sdk-php.git
   cd learnosity-sdk-php
   
bash
   git clone https://github.com/Learnosity/learnosity-sdk-php.git
   cd learnosity-sdk-php
   
 php

    ositySdk\Request\Init;
    use LearnositySdk\Utils\Uuid;
    $user_id = Uuid::generate();
    $session_id = Uuid::generate();
 php
    $consumerKey = 'yis0TYCu7U9V4o7M';
    $consumerSecret = '74c5fd430cf1242a527f6223aebd42d30464be22';
 php
    $security = [
        'domain'       => $_SERVER['SERVER_NAME'],
        'consumer_key' => $consumerKey
    ];
 php
    $init = new Init(
        'items',
        $security,
        $consumerSecret,
        $request);
    $initOptions = $init->generate();