Log in

View Full Version : How to add stock info on a site



aharvey2000
26 Jun 2009, 06:21 PM
Hello,
I am going to be making a site soon and the only issue I am going to have is how to setup a page that will fetch stock information off a site say Yahoo and put it on my site. I would like this information to be self updating so I wouldn't have to touch it besides add the new stock symbols which I have bought or sold. Please help if possible.

Adam

Skitrel
02 Jul 2009, 09:48 AM
To do this entirely yourself you would need to write a couple of scripts to scrape the information from whichever site you desired it from AND then to parse the information (get the data you want from the page you scraped).

I used to do a few things with this using CURL and PHP but I'm rusty these days.

I'd link you straight to a tutorial but I'm not allowed to post links yet as I'm a newb on these forums :D


Anyway, a quick googling of basic screen scraping and parsing tutorials should get you in the right direction.

There's also software specifically for these things that you can get hold of. Again I'd link you but I'm not allowed :D

And as a final alternative, yahoo finance and google finance both have various free modules you can create to add stock data and much more to a site, either of these might also meet your needs.