This README gives details about the folders and files in code folder as well as instructions to setup and run the webservice.

The code folder contains the following files and folders:

1. Public_html
   -----------

This folder contains all the html pages of our website along with the images and the java script.

	a.index.html : This is the index pade of our website.
	b.coursework.html : This page is kind of e-archive of our project and contains links to all the codes we need for the successful comlilation of the 		project.
	  This page gives links to :
		i) PHP code to get data from yahoo finance.
	       ii) Perl code to evaluate indicators for R software.
	      iii) PHP code to put data back into the database.
	       iv) R code to get our Regression Model and Predicted values.
	        v) Project Report.
	       vi) Gantt Project Report.
	c.login.html: This page authenticates the user and let it enter our stock forecaster only if he is a valid user.
	d.checklogin.php: This page is used to check the valid user name and password.
	e.login_success.php: If the login is successful, it directs you to the stockforecaster page.
	f.stockforecaster.html: On this page the user can make his/her choice for getQuotes, getRecommendation or Stockoftheday.
	g.page2.php:If user selects Get Quotes, the website gets directed to this page. This page displays the current stock prices.
	h.page3.php It displays our Recommendation of the stock selected by the user and with the predicted values for the last 7 days and regression           			coefficients.
	i.page4.php:This page displays the Stock of the Day.

2.data\regression_code.txt
  ------------------------

This is the R code which we run on R software to get out Regression coefficients and Predicted Prices. It gives the results in the form of the text file, stats.txt.

3.scripts\parse.pl
  ----------------
This perl code gives calculated values of the indicators for all the 60 companies to be used by the R software. The output is stored in the form of the txt file, out.txt to be used by R.

4.scripts\pred.php
  ----------------

This php code is used to put the values calculated by the R to our database. That is it takes the stats.txt file and puts it into 3 different tables in the database.

5.scripts\stockfetch.php
  ----------------------

This php code is used for getting the real time stock values from yahoo finance and puts it into our database.

6.scripts\shell.txt
  -----------------

It contains the lines of code to be typed at the command line to get our stockfetch.php code to retreive data after every 15 min.

7.data\ticker symbols.txt
  -----------------------

It contains the list of 60 companies we used for Prediction.

8.data\databasetables.txt
  -----------------------

It gives the list of tables in our database.

Instructions to setup and run stock forecaster webservice
==========================================================
- The system is primarily divided into two parts, namely, the client and the server. The task of establishing a communication between the client and the server is our soul concern.
- Install LAMP module (Linux, Apache, Mysql, PHP) at the web server. 
- Install R software at web server.
- Copy the Public_html folder into the webserver user account who will host this web service. (ex: ~group802/public_html)
- Copy all the files from the script and data folder to public_html folder in the web server.
- Make sure the LAMP module is started in order to allow the web client to use the web service.

