PDA

View Full Version : Make php USE cookies to log into other sites?


d11wtq
01-07-2005, 11:41 PM
Can php be made to use cookies so that it can log into other sites I have membership for and file_get_contents() on the html that is output by the pages. Both IE and NS log in automatically via cookies on my pc but php just ends up at the login page.

fci
01-08-2005, 01:03 AM
yes, with curl or fsockopen.. preferably curl though.
http://www.php.net/curl
http://www.php.net/fsockopen