Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hello, my friends! Please kindly note that I need to place live, streaming stock quotes (or are they called stock indexes) on the top of a client's Website. The end product would look like the very top line of the page: www.optionmonster.com.

 

However, I'm overly ambitious with a limited information set, not knowing how to go about achieving this goal. (Thank God for Larry's forum and books!) I understand that sites like Associated Press and Business News Network offer these RSS feeds, but I'm not sure what the process if for receiving them and getting them active on the top of the Website. As they are live streaming, continually changing stock prices, I believe, I imagine that I'd need to use PHP and assign the components to variables. Please excuse my lack of know-how, but any and all pieces of advice would be greatly appreciated here. How do I get these stock quotes up-and-running on the top of the Website like they are at www.optionmonster.com? Thank you so very much!

Link to comment
Share on other sites

It is a bit ambitious, but not outside the realm of possibilities if you're willing to take the time necessary to learn the necessary things and study the necessary code.

Lucky for you, Larry does an example exactly like this in his new Modern JavaScript book.

 

You can download all the code from the following page:

http://www.larryullm...lop-and-design/

 

The code you're looking for is in the ch11 folder. The files are quote.html, quote.php in the resources folder, and quote.js in the js folder.

Please note that this involves using both Ajax and making cross-domain requests with cURL. If you're not familiar with either, I recommend looking into them.

And if you don't already have Larry's JS book, it might not be a bad idea to check it out.

 

All the same, you can probably more or less just take Larry's code and modify it for your needs.

If you want to have a deeper understanding of the code though, and something confuses you, feel free to ask on these forums.

 

Good luck.

Link to comment
Share on other sites

Oh, wonderful news! I'm so excited about reading the Javascript and Ajax books next (along with the rest of the entire Ullman collection!). Thank you very much for the valuable lead, HartleySan, and thank you so much Larry for the superior book series and marvelous forum!

Link to comment
Share on other sites

 Share

×
×
  • Create New...