D
D
Dmitry Mishutin2020-08-07 17:30:16
PHP
Dmitry Mishutin, 2020-08-07 17:30:16

How to parse a page via PHP cURL with current browser cookies?

I have a PHP program like this:

$url = 'https://kwork.ru/inbox/ivan1115';
$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_SSL_VERIFYHOST => false,
    CURLOPT_SSL_VERIFYPEER => false
]);

echo curl_exec($ch);
curl_close($ch);

The bottom line is that the code will be executed AT ME on the local server through OpenServer, it should issue a page with a dialog, but does not open a page with authorization. How to make it so that the dialog page opens taking into account the current cookies, which most likely contain authorization data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2020-08-07
@MeShootIn

the code will be executed in my browser
did you invent a way to execute php in the browser? o_O
learn how php works and change your approach.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question