roanuz / php-cricket
This is php-cricket library to show Cricket Live Scores, IPL, T20, etc.
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-10 20:22:07 UTC
README
phpCricket library for Php using Roanuz Cricket API's. Easy to install and simple way to access all Roanuz Cricket API's. Its a Php library for showing Live Cricket Score, Cricket Schedule and Statistics.
Get Started
-
Clone the php-Cricket Github project by using
https://github.com/roanuz/php-cricket.git
[OR]
Install the phpCricket 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-cricket.git", "type": "git" } ], "minimum-stability" : "dev", "prefer-stable" : true, "require-dev": { "roanuz/php-cricket": "dev-master" } }
iii) Run Composer:
composer require --dev roanuz/php-cricket
iv) You can find the phpCricket library
(roanuz/php-cricket)
inside the vendor folder. -
Create a Cricket API App here My APP Login
-
Pass the required app credentials as below.
Config Section
// Create a new php file under your root directory. Inside that use this code. require_once __DIR__ . '/vendor/autoload.php'; $phpCricket = new PhpCricket\PhpCriclib('your_access_key', 'your_secret_key', 'your_app_id', 'unique_device_id');
-
After Completing Authentication you can successfully access the API's.
Example
// For getting particular match details. $getMatch = $phpCricket->getMatch('dev_season_2014_q1', 'summary_card'); echo json_encode($getMatch); //Return Match Information in JSON format // For getting schedule details $getSchedule = $phpCricket->getSchedule('2013-05'); echo json_encode($getSchedule); // Return Schedule Information in JSON format
To get the Live Score updates, you need to purchase the plan on CricketAPI Plans
Need More Code reference ?
Dive in to this file. Example Code to Access Roanuz Cricket API's
Here is List of Roanuz Cricket API's
- Match API
- Ball By Ball API
- Recent Matches API
- Recent Season API
- Schedule API
- Player Stats API
- Season API
- Season Stats API
- Season Player Stats API
- Season Points API
- Season Team API
- Over Summary API
- News Aggregation API
Roanuz Cricket API
This Library uses the Roanuz Cricket API for fetching cricket scores and stats. Learn more about Litzscore Cricket API on https://www.cricketapi.com/ . Feel free to contact their amazing support team, if you got struck.
###Support If you any question, please contact litzscore support support@cricketapi.com