PTV Timetable API sample code for PHP

API Page: https://www.ptv.vic.gov.au/about-ptv/ptv-data-and-reports/digital-products/ptv-timetable-api/ptv-timetable-api-reference/

 

1. Request API key by sending email

How to register for a key and developer ID
> Send an email to [email protected] with the following information in the subject line of the email:
• “PTV Timetable API – request for key”
> Once we’ve got your email request, we’ll send you a key and a developer ID by return email.

2. Run sample code

Response