Link to home
Start Free TrialLog in
Avatar of adworldmedia
adworldmediaFlag for United States of America

asked on

Read Web Contents via PHP using local Browser

I am not sure this is at all possible..  but I know that PHP can read the contents of a web page with the CURL commands, or the file_get_contents...

BUT, when reading such web page various cookies are stored. And when retrieved via PHP the cookies are lost.

How can I do this and maintain the state of the cookies stored on the browser?

Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adworldmedia



Thanks.  The solves half of my issue on how to retrieve a cookie from the remote service call...

But, then; how can I inject the cookie into the request?  So that the web service I'm calling see's the cookie that was saved prior?

What have you tried?  Have you made a request with cURL containing the same parameters?  If not, please try that and see if cURL sends the cookie back to the browser.
What was wrong with my answer?  Did you try my suggestion?  Why did you give a marked-down grade without responding to my question and without any explanation?

Please see the EE grading guidelines here: