πŸ“ dcsports / dcsports.php ● live PHP 8+ iCal / RFC 5545 no dependencies

🏟️ DC Sports
Combined Calendar

// four teams Β· one subscription url Β· always up to date

⚾ Nationals πŸ€ Wizards πŸ’ Capitals 🏈 Commanders

Subscribe β€” 30 seconds

This is a standard iCal feed, which means it works with any calendar app β€” Google Calendar, Apple Calendar, Outlook, Fastmail, Proton Calendar, and more. Copy the URL and paste it into whichever app you use as a new subscribed calendar.

Most apps have a "Subscribe", "Add from URL", or "Add calendar" option in their settings β€” paste the URL there. Here's how it works in Google Calendar specifically:

  1. Open Google Calendar in a browser β€” the web version has the import option; the mobile app does not.

  2. In the left sidebar, find "Other calendars" and click the + icon next to it.

  3. Choose "From URL", paste the URL above, and click "Add calendar".

  4. Done β€” all four DC teams will appear in your calendar. πŸŽ‰

πŸ“‘ About refresh rate: Calendar apps check subscribed feeds periodically β€” Google Calendar does this roughly every 12–24 hours, Apple Calendar every few hours. The feed itself is always current; the lag depends on your app's own poll schedule.

What shows up in your calendar

Each game is a calendar event. The sport emoji in the title lets you see at a glance which team is playing:

TeamExample event title
⚾ Nationals (MLB) ⚾ Nationals @ Phillies
πŸ€ Wizards (NBA) πŸ€ Celtics @ Wizards
πŸ’ Capitals (NHL) πŸ’ Capitals @ Rangers
🏈 Commanders (NFL) 🏈 Cowboys @ Commanders

Games disappear automatically once they end β€” no manual cleanup needed. When scores are available, they're included in the title: ⚾ Nationals (5) @ Phillies (3).

Each event includes the venue in the location field. Game duration is estimated at 3 hours for the purpose of the end-time filter.

How it works

dcsports.php is a single PHP file living on this server. When Google Calendar polls the URL, it runs and does four things:

  1. Fetches live schedule data for all four teams from fixturedownload.com.

  2. Filters out any game that ended more than 3 hours ago.

  3. Converts the remaining games into standard iCal events, adding the emoji, matchup title, and venue.

  4. Returns a single .ics file β€” the format all calendar apps understand.

There's no database, no cron job, no stored state. It runs fresh on every request and takes well under a second to execute.

 Β·  Download dcsports.php ↓

Data sources

Schedules come from fixturedownload.com, which publishes free JSON feeds for major North American sports leagues. The four feeds in use:

TeamFeed
⚾ Washington Nationals fixturedownload.com/feed/json/mlb-2026/washington-nationals
πŸ€ Washington Wizards fixturedownload.com/feed/json/nba-2025/washington-wizards
πŸ’ Washington Capitals fixturedownload.com/feed/json/nhl-2026/washington-capitals
🏈 Washington Commanders fixturedownload.com/feed/json/nfl-2026/washington-commanders
⚠️ Season years: The year in each URL (e.g. mlb-2026) is the season identifier fixturedownload uses. When a new season starts and games stop appearing, update the year in the $CALENDARS array at the top of dcsports.php and re-upload the file.

Customising

All the configuration is at the top of dcsports.php in the $CALENDARS array. Each entry is a feed URL and an emoji β€” add, remove, or change teams here:

$CALENDARS = [
    [
        'url'   => 'https://fixturedownload.com/feed/json/mlb-2026/washington-nationals',
        'emoji' => '⚾',
    ],
    [
        'url'   => 'https://fixturedownload.com/feed/json/nba-2025/washington-wizards',
        'emoji' => 'πŸ€',
    ],
    // add more teams here β€” any fixturedownload JSON feed works
];

The calendar's display name in Google Calendar is controlled by this line near the bottom of the script:

"X-WR-CALNAME:DC Sports\r\n"

Google Calendar sometimes ignores this on first import and labels the calendar with the URL. You can rename it manually in Google Calendar settings β€” the name you set there sticks permanently regardless of what the feed says.

Troubleshooting

SymptomMost likely cause & fix
Calendar is completely empty The server couldn't reach fixturedownload. The script tries file_get_contents then falls back to cURL β€” check that at least one is enabled on the server.
Games aren't updating Normal β€” Google polls every 12–24 hours. Nothing is broken.
Past games still showing Also Google's poll lag. Events drop off as soon as Google fetches the feed again after the 3-hour end-time window passes.
One team's games are missing That team's season year in dcsports.php likely needs bumping. Check fixturedownload.com for the current season slug and update the URL.
Calendar named after the URL Google ignoring X-WR-CALNAME on import is normal. Rename it manually in Google Calendar settings β€” Settings β†’ find the calendar β†’ edit name.