Jump to content

Login into Yahoo Finance to get and parse stock info? what i use, maybe cURL?


arianhojat

Recommended Posts

I need to get to my stock watch list and parse some stock qoutes for my personal watch/alert program I am building,

So I have to goto my 8th portfolio...

http://finance.yahoo.com/p?v&k=pf_8, but it needs my username/password combo before going in (i already have these of course but want a way to get 'into the' page via php).

 

how can i pass these in, and get the HTML contents of the page, which once in a variable i know how to cleanup and parse?

I think i read something about cURL and i was wondering if someone could help me with a quick n; dirty example on what to use.

 

Thanks,

Arian

cURL is what I use to write all of my bots. There are plenty of cURL tutorials and examples out there (it might be easier to use the command-line version first just to get a feel for it.)

 

What you have to be careful about is negotiating SSL, header information, posted form fields, and cookies. A cURL/http library might be able to help you handle all of this stuff - I myself haven't had a ton of success with them. But this firefox extension will help you track what you have to pass back and forth to the server, I think - it displays all of the headers. http://livehttpheaders.mozdev.org/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.