PHP code example of forcescripts / live-football-api-php
1. Go to this page and download the library: Download forcescripts/live-football-api-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/ */
forcescripts / live-football-api-php example snippets
use Forcescripts\LiveFootballApi\Client;
use Forcescripts\LiveFootballApi\ApiException;
$client = new Client('YOUR_API_KEY');
try {
$matches = $client->matches('2026-07-03', 'en');
print_r($matches);
} catch (ApiException $e) {
echo 'Error ' . $e->getStatusCode() . ': ' . $e->getMessage();
}