PHP code example of liblynx-llc / liblynx-connect-php

1. Go to this page and download the library: Download liblynx-llc/liblynx-connect-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/ */

    

liblynx-llc / liblynx-connect-php example snippets


$liblynx=new Liblynx\Connect\Client;
$liblynx->setCredentials('your client id', 'your client secret');

$cache=new \Symfony\Component\Cache\Simple\ArrayCache;
$liblynx->setCache($cache);

$logger = new \LibLynx\Connect\DiagnosticLogger;
$liblynx->setLogger($logger);

try {
    $identification = $liblynx->authorize(IdentificationRequest::fromArray($_SERVER));
    if ($identification->isIdentified()) {
        //visitor is identified, you can now check their access rights
    } elseif ($identification-> (LibLynx\Connect\Exception\LibLynxException $e) {
    //exceptions are throw for API failures and erroneous integrations
    throw $e;
}    
 bash
$ composer