Stock Ticker Program

This project involves:

Level 1

In this assignment you will develop a simplified Web client. Your cgi script will make requests to a remote Web server for an HTML page which contains stock information. To simplify this process, you may use the functions defined in LWP::Simple. Here is a sample URL of a yahoo page with a single stock:
http://finance.yahoo.com/q?s=csco&d=t

You will then need to write a web page parser which uses regular expressions to go thru the HTML page. You should locate and extract the following specific information:

You then need to interpret that stock information and format it into an HTML page which is then returned to the user. (The image chart itself should be displayed, not the URL.)


Level 2

Your cgi script should have the functionality of the previous level.

Your script should start by displaying an HTML form. The form should have a text area, checkboxes, a submit button, and a clear all button. The text area will be used to enter stock symbols. The checkboxes will be used to select what data should be displayed. The submit button should submit the form to the cgi script. The clear all button should reset your input fields to the original values. The form should look similar to this:

Enter Symbols:
price
change
image chart

The script should be able to make requests and provide results for multiple stock symbols. Here is a sample URL of a yahoo page with multiple stocks:

http://finance.yahoo.com/q?s=csco+t+a&d=t

You should then add functionality to allow the user to select the following information to be displayed as well:


Level 3

Your program must have Level 2 functionality. Also, you must implement a welcome page, where the user can enter a user name and a password to login onto the Web site. If the user is new to the site, they should be able to create a new account and enter at least the following information:

After a successful login or account creation, the user should be allowed to lookup stock symbols. For this, you must write an extended cgi script that can create the new account, ensure unique user names, and store the account information in either a flat ASCII file or by using functions in the Storable module. Also, your HTML forms should use the POST method so that account information (especially passwords) can not be viewed in the URL.


Level 4

You must implement the functionality of a Level 3 assignment. Your cgi script needs to maintain state between Web pages so that for every request that it receives, it knows who the user is. To do this you will use cookies. You must ensure that all cookies do not contain real data, such as login information. Here is an example: