A simple application to scrape information from an? existing? web site and maintain in a Mysql database. In three staged deliveries
1. Search facility.
2. Add searched rows to database
3. View entries in database
requires AJAX/PHP/MySQL skills
## Deliverables
This is part of what will be a multi-phase project. The first two stages are in effect a prototype, but the code will be reused for the next stages.
There will be significant work flowing from this including web design, payment gateways, and 'batch script' and reporting.
THE URL of the website to be scraped will be given to those enquiring
**Phase 1A - Search facility**
Development of a Javascript presentation layer and PHP Back-end website scrapers to process the AJAX requests from the presentation layer.
The Javascript front end will take some inputs (a name) and send the details to the PHP backend. This will send a request to a particular website and scrape these results.
The scraped HTML results will be parsed by the PHP and XML returned to the Front-end. The Javascript will parse the XML and display summary results to the users.
The front-end should be written in Javascript using [[login to view URL]][1] if possible.
The front end should display a text box so that the user can input a name.
Once the name is input an AJAX request is sent to the back-end containing the name.
The back-end will then perform a search on a website. When the search results a processed, five fields should be returned for each hit
Company No
Company Name
Status
Type
Indicator
The Javascript front end will then parse the returned XML and display the results in rows down the page.
There may be a number of results which will run to more than 1 page, in which case the results will be paginated, and the user can click page 2 for the second page of results etc.
The user should be able to mouse over the row if the row is clicked then an AJAX call will be made to a second PHP back-end script which will make search using the Reference field obtained in XML above and will return by XML the following information.
Company No
Company Name
Type
Address Field
Start Date
Indicator Y/N
End Date
Status
This information will then be formated and displayed as a Javascript alert.
**Phase 1B - Insert/Delete selected rows in Phase 1A to a database per user**
Login Functionality
There will be a ‘home page’ where a user can log in or register
When they register they are required to supply a username and a password
The username and the hashed password will be stored in a table in a MySQL database.
To log in subsequently they will be required to supply the username and password
Search and add Companies
This will involving modifying the Search facility in Phase 1A so that there is an ability to add a selected company to a database of monitored companies.
There will be a table of the Company Numbers(s) for each user.
The table will contain the following rows.
Username
Company Number
Company Name (this isnt ‘normalised’ but is required for sort purposes)
Country Code (this will be hardcoded initially to IOM) on all records
Date started monitoring (from current time)
Date finished monitoring (updated when deleted)
View Monitored Companies
This will query the sql database of company Numbers and sorted? by ascending alpha Company name sequence display a row for each Company Number.
There may be a number of results which will run to more than 1 page, in which case the results will be paginated, and the user can click page 2 for the second page of results etc.
The user should be able to mouse over the row if the row is clicked then an AJAX call will be made to a second PHP back-end script which will make search using the Reference field obtained in XML above and will return by XML the following information.
Company Number
Company Name
Type
Address Field
Start Date
Indicator Y/N
End Date
Status
This information will then be ‘nicely’ formated and displayed as a Javascript alert.
There will be an option to delete a reference from the SQL database for each line.
If this option is selected then a javascript alert YES/NO prompt will be displayed with a prompt “Do you want to stop monitoring [Company Name] ???
If the user chooses YES then the “Date finished monitoring will be set to [now]?? and the record will be deleted.
The list of Company Numbers will be updated without refresh (ajax).