PHP code example of mysportsfeeds / mysportsfeeds-php

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

    

mysportsfeeds / mysportsfeeds-php example snippets


    $data = $msf->getData('nba', '2016-2017-regular', 'player_gamelogs', 'json', 'player=stephen-curry');

    $data = $msf->getData('nfl', '2015-2016-regular', 'cumulative_player_stats', 'xml', 'team=dallas-cowboys');

    $data = $msf->getData('nba', '2016-2017-regular', 'seasonal_player_gamelogs', 'json', 'player=stephen-curry');

    $data = $msf->getData('nfl', '2015-regular', 'seasonal_player_stats', 'xml', 'team=dallas-cowboys');

    $data = $msf->getData('mlb', '2016-playoff', 'seasonal_games', 'csv');