Avatar of adworldmedia
adworldmedia
Flag 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?

Thanks
PHP

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
adworldmedia

ASKER
Ray,

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?

-Joe
Ray Paseur

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.
Ray Paseur

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:
http://support.experts-exchange.com/customer/portal/articles/481419
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck