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

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.