NMBS/SNCB for iPhone

As there is no iPhone compatible website or application, I created my own NMBS “route planner” for the iPhone. This is no app though, this is just an iPhone website.

Basicly, this is what you can do:

  • fill in departure station
  • fill in arrival station
  • fill in time and date (of departure)

At this stage of the project, only the basic train details are shown (departure time, arrival time) and up to 3 or 4 different possibilities (depending what the NMBS website replies).

There is no option (and I’m unsure whether there will be in the future) to see details about a selected trip (like stops and station changes).

The site is made in English, but you can choose in what language you want the results, the only problem I’ve seen so far is that for DE and EN all train station names are in French (Antwerp becomes Anvers), but this “bug” lies out of my hands, as all train information is received from the NMBS websites, including station names.

Basicly this is what it does: it opens a HTTP socket to the NMBS site, filling in your details (like date and stations), and gets the reply back (if the NMBS site replies in time, I’ve seen a few time outs).

All unrequired information is cut off, and you remain with just the trip details. Which should just fit your iPhone in landscape mode.

When filling in your station details, please use existing stations names (language shouldn’t matter), including Central, North, South, etc if needed. Requesting the station “Brussels” won’t work and will just display an empty page for now.

Things I’ll be working on:

  • layout and design of the trip detail page
  • I’ve seen that my Sessions do some weird stuff from time to time (refresh the main page 2x and all sessions are destroyed); but that’s something I’ll have to look in
  • Well, I guess most users want more information, so I’ll have to try to get trip details
  • and better data handling. Still too much unrequired information.
  • Error handling, if e.g. the station doesn’t exist or the date/time is incorrect

Please leave your feedback/bug reports in a comment or per e-mail.

Also, if visiting the website with Firefox, IE or even Chrome… Yes, it’s not compatible to any of them. My website looks dodgy in those browsers; I’ve only focussed on the iPhone browser.


Posted by

in

, , ,

Comments

8 responses to “NMBS/SNCB for iPhone”

  1. […] my attempt to make […]

  2. Anner avatar
    Anner

    Good work,

    I’ve already send you my remarks in an email.
    Keep in mind those did not take into account this post!

  3. […] These are the things I’ve worked on: […]

  4. […] built-in a new function; the station name […]

  5. Zillode avatar

    Is it possible the you release the source under GPL or something? I’d like to have the same application on my android phone. So I’ll port your code and when the api changes we can fix it. It would also be interesting to combine the nmbs info with the railtime site.

  6. Tuinslak avatar

    I’ll think about it. I’m just rather busy atm.

    I was already planning to publish some API some day. The problem is that atm I just get the info from NMBS and display what they reply (cutting off some html on top and bottom of the page). I don’t have line per line the information.

    What has to be different from the Android? Sizes?

  7. Zillode avatar

    Thanks for the info, I’ll try to parse the website by myself.
    @Android: I was planning to make an application for it instead of using a website. But I tried your site and it works well! Sry for the confusion.

  8. Tuinslak avatar

    Well, I sure want to help. iRail has some shortcomings (like no detailed info about a trip). It’s just that the whole parsing from the NMBS website is quite annoying.

    The site is written using PHP; can make make ‘webapps’ in Android? Basicly querying a website and displaying the info from the website within the app?

    How is iRail displayed on an Android phone btw? No broken layout?

    I once wanted to make an iRail app for the iPhone too, but I lack skills in Cocoa.

Leave a Reply…