I though of that at first but this would mean too much reliance on a web service. I will need to have an app hosted to pull data from IRIS, then have the app on the mobile device pull data from this online app. This will make the app harder to maintain but its an option im willing to explore in the future
sign up for Google App engine and it's quite easy to maintain/manage. no need to worry about app hosting or whatsoever.
Since you guys are going to work on the web service, please add support for checking bus schedules of buses at bus interchanges. And do try to make HTTP calls directly to mobile iris instead of sbsnextbus.appspot.com, since sbsnextbus.appspot.com is just a proxy to grab data from mobile iris.
API for bus interchange:
Domain: http://www.sbstransit.com.sg
HTTP GET Base URL: /mobileiris/mobresult_dep.aspx
Parameters: intcode=XXX&svc=YYY&dispsvc=YYY (just input bus interchange code & bus service numbr inside)
Note: Always use 3 digit bus service number, e.g. "074M", "074", "007", etc
Extra Note: Do note that this script seems to redirect certain browsers (by user agent) to index page, e.g. IE Mobile is one of the blocked ones. I use user agent of a random java phone to spoof it.
Bus Interchange Codes:
Ang Mo Kio Depot (5500)
Ang Mo Kio Int (5400)
Bedok Int (8400)
Bishan Int (5300)
Boon Lay Int (2200)
Bt Batok Int (4300)
Bt Merah Int (1000)
Bt Panjang Int (4500)
Buona Vista Ter (1137)
Changi Airport PTB1 (9502)
Changi Airport PTB2 (9512)
Changi Airport PTB3 (9510)
Changi Village Ter (9900)
Choa Chu Kang Int (4400)
Clementi Temp Int (1700)
Eunos Int (8200)
Ghim Moh Ter (1100)
HarbourFront Int (1400)
Hougang Ctrl Int (6400)
Jurong East Int (2800)
Kent Ridge Ter (1600)
Lor 1 Geylang Ter (8000)
Marina Ctr (0209)
Marina Sth Pier Ter (0341)
New Bridge Rd Ter (1058)
Pasir Ris Int (7700)
Punggol Temp Int (6500)
Queen St Ter (0110)
Sembawang Int (5800)
Sengkang Int (6700)
Serangoon Int (6600)
Shenton Way Ter (0323)
Sims Place Ter (8028)
St. Michael's Ter (5249)
Tampines Int (7500)
Toa Payoh Int (5200)
Tuas Ter (2500)
Upp East Coast Ter (9400)
Woodlands Reg Int (4600)
Yio Chu Kang Ter (5550)
Yishun Int (5900)
Since you guys are going to work on the web service, please add support for checking bus schedules of buses at bus interchanges. And do try to make HTTP calls directly to mobile iris instead of sbsnextbus.appspot.com, since sbsnextbus.appspot.com is just a proxy to grab data from mobile iris.
API for bus interchange:
Domain: http://www.sbstransit.com.sg
HTTP GET Base URL: /mobileiris/mobresult_dep.aspx
Parameters: intcode=XXX&svc=YYY&dispsvc=YYY (just input bus interchange code & bus service numbr inside)
Note: Always use 3 digit bus service number, e.g. "074M", "074", "007", etc
Extra Note: Do note that this script seems to redirect certain browsers (by user agent) to index page, e.g. IE Mobile is one of the blocked ones. I use user agent of a random java phone to spoof it.
Bus Interchange Codes:
Ang Mo Kio Depot (5500)
Ang Mo Kio Int (5400)
Bedok Int (8400)
Bishan Int (5300)
Boon Lay Int (2200)
Bt Batok Int (4300)
Bt Merah Int (1000)
Bt Panjang Int (4500)
Buona Vista Ter (1137)
Changi Airport PTB1 (9502)
Changi Airport PTB2 (9512)
Changi Airport PTB3 (9510)
Changi Village Ter (9900)
Choa Chu Kang Int (4400)
Clementi Temp Int (1700)
Eunos Int (8200)
Ghim Moh Ter (1100)
HarbourFront Int (1400)
Hougang Ctrl Int (6400)
Jurong East Int (2800)
Kent Ridge Ter (1600)
Lor 1 Geylang Ter (8000)
Marina Ctr (0209)
Marina Sth Pier Ter (0341)
New Bridge Rd Ter (1058)
Pasir Ris Int (7700)
Punggol Temp Int (6500)
Queen St Ter (0110)
Sembawang Int (5800)
Sengkang Int (6700)
Serangoon Int (6600)
Shenton Way Ter (0323)
Sims Place Ter (8028)
St. Michael's Ter (5249)
Tampines Int (7500)
Toa Payoh Int (5200)
Tuas Ter (2500)
Upp East Coast Ter (9400)
Woodlands Reg Int (4600)
Yio Chu Kang Ter (5550)
Yishun Int (5900)
Where did you get this list from? Is it a comprehensive list?
Tried coding it to include the interchange list you gave.
I'm using the same engine to pull bus timing from the interchange as I am from the bus stop. Only change is the IRIS URL where I pull the data from, but funny thing is, the result is kinda unstable. More than half my request brings up an empty page and I'm unable to debug why. Its kinda random and I'm not sure if its my coding or IRIS blocking repeated request within a short time frame. This will be my todo list for the future release but may take a while as work is getting busy now
Anyway, a new version is now ready. This version improves on the time taken to pull the bus timing by using multiple threads to make the request to IRIS. A friend was kinda enough to help me host the app so you may now download the latest version from here
I haven't found time to test the HTTP GET yet, but have you tried to fake the user agent, e.g. use "Opera/8.01 (J2ME/MIDP; Opera Mini/3.1.10423/1724; en; U; ssr)"? mobile iris seems to block the default user agent of WM devices when making a direct HTTP GET request, skipping their form page.
I haven't found time to test the HTTP GET yet, but have you tried to fake the user agent, e.g. use "Opera/8.01 (J2ME/MIDP; Opera Mini/3.1.10423/1724; en; U; ssr)"? mobile iris seems to block the default user agent of WM devices when making a direct HTTP GET request, skipping their form page.
Yup I did that. Even the normal bus timing pages at the bus stops do not open if the user agent is left to the default one. I will try a few other agents and see if that solves the problem
Tried coding it to include the interchange list you gave.
I'm using the same engine to pull bus timing from the interchange as I am from the bus stop. Only change is the IRIS URL where I pull the data from, but funny thing is, the result is kinda unstable. More than half my request brings up an empty page and I'm unable to debug why. Its kinda random and I'm not sure if its my coding or IRIS blocking repeated request within a short time frame. This will be my todo list for the future release but may take a while as work is getting busy now
Anyway, a new version is now ready. This version improves on the time taken to pull the bus timing by using multiple threads to make the request to IRIS. A friend was kinda enough to help me host the app so you may now download the latest version from here
Hi kewl this is what i did for my php test page using cURL.
1) query the server and grab their session id. -> the number between the brackets
2) append the session id to the interchange request and query
i found out that this method is very stable and i do not have to do any user agent spoofing at all
if i do not add in the session id i will get redirected to the main page.
This post has been edited by afoongwl215: 10 February 2010 - 01:42 AM