View on GitHub


A lightweight version of the php api

Download this project as a .zip file Download this project as a tar.gz file

This code was created at the OCLC Developer House to provide a simple PHP interface to the OCLC's WorldCat Knowledge Base API.

See the API Wiki for usage details.


Create your own configuration file mykey.txt

wskey = xxxx
inst_id = 123456

Sample application to display Knowledge Base Providers

  include 'kbService.php';
  include 'oclcClient.php';

  $kbService = new kbService("mykey.txt");
  $oclcClient = new oclcClient("index.php", $_GET);

  $providers = $kbService->getProviders($oclcClient->serviceOpt, $oclcClient->pageOpt);

  echo "<h2>KB Providers for {$kbService->getInstId()}</h2>";
  echo $oclcClient->getPaginationSummary($providers, "Providers");
  echo $oclcClient->getTable($providers);