PHP code example of mlntn / fpl-api

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

    

mlntn / fpl-api example snippets



$autoloader = new Cache\Provider\File('./cache', 86400));

$player = $api->getPlayer(323);
die(json_encode($player));

// prettier with this:
// json_encode($player, JSON_PRETTY_PRINT ^ JSON_UNESCAPED_UNICODE ^ JSON_UNESCAPED_SLASHES)