Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 513 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 513 Bytes

PhpNsTrains

This is a PHP API for accessing the NS (Dutch Railways) API / WebService. Details for this service and signing up (account is required, rate limited to 50,000 requests per service, per day) are documented here.

Currently supported is:

  • List of train stations
  • Live departures
  • List of disruptions
  • Trip planning and fares

Basic usage example

require ('ns_api.class.php');
$ns = new NsApi(API_ACCOUNT, API_KEY);
$ns->getStations('code', true);