We now have some key bits of information about this page. Let’s recap what we have discovered and learned:
1. 411Sync.com parses an RSS file on your server and passes it to the user. The service can take a variable from the user and pass to your page.
2. The page of incidents is at http://cad.chp.ca.gov/body.asp?centerin=XXCC, where “
XXCC
” is a four character code that defines the area to pull.3. The incidents are in the second table of that page.
4. The columns of the incidents are always in the order ID Number, type, location, and general area.
5. Each incident cell has a class attribute whose value is
T
.
Based on these factors, the format needs of 411Sync.com, and user-friendliness for mobile users, we are going to break down our application into the following components:
clsIncident.php
—An incident object, this is our “Model” component. All this class will do is hold information about an incident—time, location, etc.clsDomParser.php
—We are going to take a page from our event-based...