Simulating a cookie-enabled browser in PHP
Posted
by Itamar Benzaken
on Stack Overflow
See other posts from Stack Overflow
or by Itamar Benzaken
Published on 2008-11-18T05:52:37Z
Indexed on
2010/05/20
15:30 UTC
Read the original article
Hit count: 290
How can I open a web-page and receive its cookies using PHP?
The motivation: I am trying to use feed43 to create an RSS feed from the non-RSS-enabled HighLearn website (remote learning website). I found the web-page that contains the feed contents I need to parse, however, it requires to login first. Luckily, logging in can be done via a GET request so it's as easy as fopen()ing "http://highlearn.website/login_page.asp?userID=foo&password=bar" for example. But I still need to get the cookies generated when I logged in, pass the cookies to the real client (using setcookie() maybe?) and then redirect.
© Stack Overflow or respective owner