PHP code example of alexkratky / apix

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

    

alexkratky / apix example snippets



use AlexKratky\API;
use AlexKratky\Cache;

Cache::setDirectory(__DIR__ . '/cache/');

$API_Endpoint = new API('v1');
if(!$API_Endpoint->request(new URL())) {
    echo $API_Endpoint->error();
    exit();
}

//valid API request. Continue with code.