I want to do a fantasy stock trading game at my school. I'm creating a Client program that all the participants get and a Server program that will run on the master computer and is how the client programs execute trades. If someone wants to buy a stock, they would open their client, type in the stock symbol (i.e. INTL for intel or EBAY for ebay), and hit submit. The client would send this information to the server.
My problem is I need a way for the server to know what the stock is trading at, at the time of trade execution. On Yahoo! Finance, you can get information on any company at the following website: " where ebay is any 3 or 4 letter stock symbol. I want the server to get the webpage for a given stock, parse it for the price which is in the source code, and then send it back to the client.
My question is how do I get my program to access the source code for a specific URL. If I could have the source code as a text file, I know how to parse it for the quote. It is just getting the source code that I'm unsure about.
Thanks for the help.
-Mike
-Mike
My problem is I need a way for the server to know what the stock is trading at, at the time of trade execution. On Yahoo! Finance, you can get information on any company at the following website: " where ebay is any 3 or 4 letter stock symbol. I want the server to get the webpage for a given stock, parse it for the price which is in the source code, and then send it back to the client.
My question is how do I get my program to access the source code for a specific URL. If I could have the source code as a text file, I know how to parse it for the quote. It is just getting the source code that I'm unsure about.
Thanks for the help.
-Mike
-Mike