I wrote a script on localhost WAMP, that collects the HTML source (with file_get_contents($url) and regex) from my favorite sites and puts it all together (for my own personal use), so I don't have to manually visit each site to read all that I need to read.
However, it does not work if the site has a username/password login form (html form, not Apache "basic authentication").
What php code can: 1) submit my username and password to the form; 2) make it think the script is Internet Explorer user agent (in case the site requires that); and 3) accept and store any cookies that the site requires to work right?