CentralTrainer
Member
- Joined
- 1 Feb 2017
- Messages
- 359
I’m putting together a web app (html pages that behave like a mobile phone app) as a project in my spare time for when I travel to certain places.
One feature I’m trying to implement is a button - that when you click it - loads up the NRE or similar site showing the next trains between two specified stations.
I know that NRE uses a structure in its urls with the two 3 letter station codes used - but I’m struggling to come up the link structure to open up the planner for the current day and not having to specify a date and time as it’ll be a static link.
Examples:
NRE - Sandwell to Worcester:
https://m.nationalrail. co.uk/pj/plan/SAD/WOF/230222/2135/dep
However that gives services on the 23rd departing 21:35
If I just have it set as:
https://m.nationalrail. co.uk/pj/plan/SAD/WOF/dep
It errors out and does not give the next services.
Anyone know of a way I can get the URL to play ball or can tell me of another planner site that would do this?
One feature I’m trying to implement is a button - that when you click it - loads up the NRE or similar site showing the next trains between two specified stations.
I know that NRE uses a structure in its urls with the two 3 letter station codes used - but I’m struggling to come up the link structure to open up the planner for the current day and not having to specify a date and time as it’ll be a static link.
Examples:
NRE - Sandwell to Worcester:
https://m.nationalrail. co.uk/pj/plan/SAD/WOF/230222/2135/dep
However that gives services on the 23rd departing 21:35
If I just have it set as:
https://m.nationalrail. co.uk/pj/plan/SAD/WOF/dep
It errors out and does not give the next services.
Anyone know of a way I can get the URL to play ball or can tell me of another planner site that would do this?