This project requires two components - a PHP based site scraper (backend), and a JavaScript presentation layer (frontend). The aim of the application is to scrape results from a realestate website and display them to the user.
The JavaScript frontend will take some inputs which it will use to send an AJAX request to the site scraper (PHP) backend, the PHP backend will send a request to a particular realestate website and subsequenly scrape the results from the website, the resulting HTML will be parsed by the PHP and XML returned to the JavaScript front end, the JavaScript will parse the XML and display the summary property results to the user.
## Deliverables
Additional detail ... the frontend will be written in JavaScript, using the Prototype libraries where possible ([login to view URL]). Intitially the frontend should display a text box for the user to enter the suburb they wish to search for, it should also display a state drop down (with options VIC, NSW, TAS, SA, NT, QLD, WA and ACT) and another dropdown with the particular realestate website listed in it. There should also be a button to seach.
When the user enters a suburb and chooses a state and realestae website an AJAX request should be sent to the PHP backend containing the three values (suburb, state and website). The PHP backend should use these three fields to construct a request to send to the realestate website, the search query will attempt to search for all properties listed for sale in the given suburb/ state. When the PHP has loaded the results from the realestate website it should parse/ scrape the results and identify the unique properties listed for sale. For each property the PHP should identify the address, the URL of the picture and the URL of the selling agents logo - these three fields should be returned in XML format to the javascript frontend.
The javascript frontend should then parse the XML and display the results as rows down the page. Given that there may be many pages of results returned (on the realestate website) the PHP should also identify how many pages of results are available and send this information back in the XML as well. These should be presented to the user as pagination options, so the user can click on 'page 2' and a request will be sent for page 2 of the results.
In the case of no results being displayed an appropriate error should be shown to the user.
The user should be able to mouse over the rows (each property), each row will highlight as they do so, when the appropriate row is found the user should be able to click on the row and the URL or the agents logo should be displayed as a JavaScript alert.
The PHP required to run the searches and parse the results should be in an easily configurable file, initially only one real estate website will be searched however over time many more may be added, thus the need for a simple configuration per site to be searched. The selected coder will be offered this and all other follow up work (assuming successful completion).
Whilst the user is waiting for the search to be executed by the PHP backend a "loading" image should be dispalyed to the user.
Code must be commented and well formatted.
Initially the target real estate web site will be [login to view URL] - a sample search string is provided below
---
An example of a search URL is: [login to view URL]
Searching for Bondi, in NSW. There are about 7 pages of results for this particular search, so the initial search should display the first page of results (top 10) as well as links to click through to the other 6 pages of results, clicking page 2 will show page 2 results, etc etc.
I intend on using this small project to establish a long term business relationship with the coder (there is a lot more work available primarily using languages such as PHP, Javascript, MySQL and PostgreSQL).