falconx Posted July 7, 2008 Share Posted July 7, 2008 Hello, I am a beginner PHP programmer. I wrote a simple program to obtain stock quotes from yahoo and put those quotes on a site for display. the script uses file_get_contents() routine to obtain the website for parsing. Recently, I have signedup for a service on investors.com and i would like to use the php program i wrote to access certain ratings/rankings (keep track of ratings..etc). The problem is that the web site requires users to login with email and password. And im not sure how to go about to access the page using php with my login and pass. The website uses .asp and it can remember your session as long as you dont logout. What are some of the ways to get the web content using php from a website that requires login and password? Thanks Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/ Share on other sites More sharing options...
DarkWater Posted July 7, 2008 Share Posted July 7, 2008 You use cURL to post the login data to the login page (where the login form points) then you retrieve the page with cURL. Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-583546 Share on other sites More sharing options...
gigas10 Posted July 7, 2008 Share Posted July 7, 2008 leave a browser up on that site logged in, and dont log out :-p Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-583581 Share on other sites More sharing options...
Jabop Posted July 7, 2008 Share Posted July 7, 2008 leave a browser up on that site logged in, and dont log out :-p that is a bad suggestion. use cURL. Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-583588 Share on other sites More sharing options...
gigas10 Posted July 7, 2008 Share Posted July 7, 2008 oh shot down Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-583590 Share on other sites More sharing options...
anon_login_001 Posted July 7, 2008 Share Posted July 7, 2008 cURL probably is the best solution for this. Take your time figuring out how to do it right though... you don't want to go shooting your username/password (to whichever site) around the internet in plain text. Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-583594 Share on other sites More sharing options...
falconx Posted July 8, 2008 Author Share Posted July 8, 2008 Thank you guys for the suggestion, I will read up on cURL and try it out. Im sure I will have questions on this For now, thanks for all your effort. Link to comment https://forums.phpfreaks.com/topic/113567-php-getting-webcontent-suggestions-or-ideas-for-websites-with-loginpass/#findComment-584196 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.