930 Forums

=> GENERAL DISCUSSION => Topic started by: Chip Chanko on April 08, 2008, 11:31:00 pm

Title: Question for programmers
Post by: Chip Chanko on April 08, 2008, 11:31:00 pm
Can anyone tell me how the metro next train (http://www.wmata.com/metrorail/stations_pid.cfm) page works? Is it pulling XML from a source? I can't figure it out looking at the page source but want to write a chumby (http://www.chumby.com) widget for it.
 
 Please move on if this is nerding you out.
Title: Re: Question for programmers
Post by: sweetcell on April 08, 2008, 11:59:00 pm
is it just me, or is it smelling geeky in here?
 
 the key is the string "http://www.wmata.com:80/metrorail/Stations/showpid/showpid_refresh.cfm?station=31"  
 
 .cfm = the pages are being served up by  coldfusion (http://en.wikipedia.org/wiki/Coldfusion), and thus the data source is probably inaccessible unless they were really lax about implementing security.
 
 since accessing the data directly will likely be impossible (and could potentially land you in hot water), you might consider simple text scraping instead.
Title: Re: Question for programmers
Post by: vansmack on April 09, 2008, 12:05:00 am
It's not impossible.
 
 Here's a Next Muni widget for the San Francisco System (http://www.apple.com/downloads/dashboard/transportation/nextmuni.html) (same provider).
 
 I would email the designer. (http://www.opt-shift.com/applications/nextmuni/index.html)
Title: Re: Question for programmers
Post by: sweetcell on April 09, 2008, 12:24:00 am
ah yes, obviously if the designer/admin gives you access to the data then you're off to the races.
Title: Re: Question for programmers
Post by: RatBastard on April 09, 2008, 03:19:00 am
You cant tell the underlying dynamic feed (USUALLY) from teh code generated by it.  Thats part of teh beauty of dynamic content.  For example you can use PHP to create dynamic content and theer is no way that the user will know.  Dont even have to directly use a .php file to do it.  You can use an include directive in an .html (.shtml, etc) page to load external php code.  I have not looked at the page in question so perhaps theer is enough indication there to deduce the data used to dirve the content but do not be surprised if it cant be done with 100% certainty.
Title: Re: Question for programmers
Post by: Relaxer on April 09, 2008, 09:15:00 am
Don't forget to prepare that Fetzer valve with some 3-in-1 oil and some gauze pads. And I'm gonna need about ten quarts of anti-freeze, preferably Prestone. No, no make that Quaker State.
 
 It's all ball bearings nowadays.
Title: Re: Question for programmers
Post by: Chip Chanko on April 09, 2008, 09:18:00 am
Wow. I was expecting either no replies and/or tomato throwing. Thanks guys. The easiest thing for me to do would probably be to figure out pulling the text from their popup.
 
 I may also just write to them (hopefully can figure out the right person to talk to) and convince them to make a simple widget. Since they've also made this info accessible for phones on their mobile site  they probably want people to have as many ways to access it as possible.
Title: Re: Question for programmers
Post by: thirsty moore on April 09, 2008, 09:47:00 am
U R 1337 hAxx0r.
 
 
Quote
Originally posted by Chip Chanko:
  Wow. I was expecting either no replies and/or tomato throwing.