PHP

PHP

Overview

Our open source PHP client provides a simple way to invoke the API from PHP. To download the PHP client, right-click /clients/lms_api.php  and then save the contents to your local computer.

Example: code

The following example lists all the courses in your site:

$API = new Api( array( 'host' => 'yoursite.edu20.com',

 'api_key' => 'xxxxx-xxxx-xxxxxxxxxxxxx',

 'api_version' => '1',

 'use_ssl' => true, ));

//method calling example, with print_r for debug

$all_classes = $API->get_all_classes();

print_r($all_classes);

Example: output

get_all_classes

12461 => Introduction to Marketing, Self paced

12883 => Sales pitches, Self paced

13232 => Advanced Marketing, Instructor

14365 => Defensive Driving, Instructor

    • Related Articles

    • API 3.0

      Introduction Welcome to the help area for API 3.0, the third generation of our Application Programming Interface. API 3.0 implements RESTFUL best practices whenever possible, and includes an OpenAPI 3.0.2 specification so that it can be easily ...
    • Java

      Overview Our open source Java client provides a simple way to invoke the API from Java. Installation You can download the Java API from/clients/java-api-client.zip and include it in your project. Dependencies: http://unirest.io/java.html and ...
    • Javascript

      Overview Our open source Javascript client provides a simple way to invoke the API from Javascript. To download the Javascript client, right-click /javascripts/lms_api.js and the save the contents to your local computer. The Javascript client is ...
    • NET

      Overview Our open source C# client provides a simple way to invoke the API from C#. Installation You can download the C# API from /clients/csharp-api-client.zip and include it in your project. Depencencies: https://github.com/mgholam/fastJSON ...
    • Ruby

      Our open source Ruby client provides a simple way to invoke the API from Ruby. Overview To download the Ruby client, right-click /clients/lms_api.rb and the save the contents to your local computer. Example: code The following example lists all the ...