Automated quotes for my 401K
January 28, 2005So I was just playing around with PHP and poking around in Google, discovered it’s pretty easy to use PHP to pull queries off the Yahoo finance server. So I built a quote page tonight while I was watching the Australian Open on ESPN2. So I can see at a glance how the various funds that are offered in my 401K are doing. I don’t own all these funds, it’s just nice to see how all of them are doing.
The PHP was pretty simple–there’s a hash (they call them just arrays in PHP) that maps the ticker symbol to the name of each fund. Then the code loops thru and hits the Yahoo quote server for each symbol, and generates appropriate links as well as displaying the results. Final touch was adding code to detect whether the price change starts with a plus sign, and if so changes the color to green so you can tell at a glance which funds went up and which went down.
Now that I’ve seen how easy this PHP stuff is I’m gonna try to build myself a few other gizmos. Not sure what else I need but I’ll fiind something.
TrackBack URI