| Recommend this page to a friend! |
| Info | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Total: 118 | All time: 9,534 This week: 49 | |||||
| Version | License | PHP version | Categories | |||
| thesportsdb 1.0.9 | GNU General Publi... | 5.5 | PHP 5, Games, Web services |
| Description | Author | |||
This package can get game information from the Sports DB site API. Innovation Award
|
PHP Library to connect to the api of http://thesportsdb.com/
<?php
include_once __DIR__ . '/default_bootstrap.php';
// Get all sports.
$sports = $db->getSports();
// Print the first sport.
$sport = reset($sports);
print_r($sport->raw());
// Get the leagues of this sport (lazy loaded).
$leagues = $sport->getLeagues();
// Print the first league.
$league = reset($leagues);
print_r($league->raw());
// Get the seasons for this league.
$seasons = $league->getSeasons();
// Print the first season.
$season = reset($seasons);
print_r($season->raw());
// Get the events for this league.
$events = $season->getEvents();
// Print the first event.
$event = reset($events);
// Trigger lazy load, the full event object will be loaded when calling $event->raw().
$event->getName();
print_r($event->raw());
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Conf. | Configuration script | |||
| Conf. | Configuration script | |||
| Lic. | License | |||
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| User Ratings | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.