/prochains_departs

a faster local web site for sncf train departure

Primary LanguagePHPGNU General Public License v2.0GPL-2.0

EDIT : The web site has been shut down by SNCF,
now, you should use http://www.ter-sncf.mobi/

This is just a quick and *dirty* code to get faster informations on french trains departures.
(It's often faster than www.gares-en-mouvement.com).
It mimics the widget "prochains departs" that is not available for linux (and doesn't run with wine)

To add your own train station, use this little script:
wget -O- http://widget.canaltp.fr/Prochains_departs_15122009/dev/gare.php?txtrech=lyon 2>/dev/null ; echo

And the 1st thing that the widget was doing is that:
wget -O- http://widget.canaltp.fr/Prochains_departs_15122009/dev/param.php?numafficheur=0 2>/dev/null ; echo
(but we don't care in our case)

you will need php and php-curl packages.

another source :
http://horaires-ter-sncf.naholyr.fr
http://horaires-ter-sncf.naholyr.fr/v3/prochainsdeparts.php
http://horaires-ter-sncf.naholyr.fr/v3/train.php
it uses ter-mobile.fr:
ex:
POST request : curl -d "idxGare=5912&codeUIC=87721332&idxNombre=8" http://www.termobile.fr/rechercherRPD.do