Skip to content

bediniupi/Alma-Webhook-Class-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Alma-Webhook-Class-PHP

A class to use Alma Ex Libris webhooks in php scripts

  • You can use both JSON and XML output
  • Challenge and Signature verification
  • Logging system

Usage

Example code

<?php
require("Alma_webhook_class.php");
$webh = new almaWebhook('Secret'); // or $webh = new almaWebhook() if you place secret in class file directly;
if ($webh->result) {
    //your code (use $webh->res_obj to collect data; if you prefer arrays, use $dataray = (array)$webh->res_obj, $webh->result contains result as a string);
    $action = $webh->res_obj->action; // event type in Alma    
    $webh->addLog("this is happening"); // add info to log
  } 
file_put_contents("filelog.txt", $webh->log, FILE_APPEND); // save log to a file
?>

Prerequisites

  • PHP, Web Server HTTPS
  • Alma Ex Libris

Authors

  • Nazzareno Bedini - University of Pisa

References

About

A class to use Alma Ex Libris webhooks in php scripts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages