php-football library for using Roanuz Football API in any website or web-app written in php. Easy to install and simple way to access all Roanuz Football API. Its a Php library for showing Live Football Score, Football Match Schedule and Statistics.
- A) Clone the php-football Github project by using
https://github.com/roanuz/php-football.git
(Or)
B) Install the php-football using Composer. Follow the below instructions.i) Download and install Composer by following the official instructions.
ii) Create a composer.json defining your dependencies inside your project root directory.
// Copy this content into your composer.json file.
{
"repositories": [
{
"url": "https://github.com/roanuz/php-football.git",
"type": "git"
}
],
"minimum-stability" : "dev",
"prefer-stable" : true,
"require-dev": {
"roanuz/php-football": "dev-master"
}
}
iii) Run Composer: composer require --dev roanuz/php-football
iv) You can find the php-football library(roanuz/php-football)
inside the vendor folder.
-
Create a Football API APP here My APP Login
-
Pass the required app credentials as below.
// Create a new php file under your root directory. Inside that use this code. require_once __DIR__ . '/vendor/autoload.php'; $phpFootball = new PhpFootball\PhpFootballLib('YOUR_ACCESS_KEY', 'YOUR_SECRET_KEY', 'YOUR_APP_ID', 'UNIQUE_DEVICE_ID');
-
After Completing Authentication you can successfully access the API's.
// For getting particular match details. $getMatch = $phpFootball->getMatch('MATCH_KEY'); echo json_encode($getMatch);//Return Match Information in JSON format // For getting schedule details $getSchedule = $phpFootball->getSchedule('2018-05'); //To get the schedules of month May, 2018. echo json_encode($getSchedule); // Return Schedule Information in JSON format
To get the Live Score updates, you need to purchase the plan on FootballAPI Website
Dive in to this file. Example Code to Access Roanuz Football API
- Match API
- Tournament API
- Tournament Team API
- Tournament Round API
- Tournament Stats API
- Tournament Team Stats API
- Tournament Player Stats API
- Schedule API
- Tournament Schedule API
- Recent Tournaments API
- Matches in Round API
- Recent Tournament Matches API
- Tournament Standings API
This Library uses the Roanuz Football API for fetching football scores and stats. Feel free to contact their amazing support team, if you fave any query or doubt.
If you any question, feel free to contact us at - [email protected]