L
L
linuxnb2017-08-29 09:57:28
mint
linuxnb, 2017-08-29 09:57:28

How to get data from a page using cookies?

good time of the day, how to sniff a page using curl and php (required data only for authorized ones) and in what format should cookies be?
udp should be substituted in the cookie request and get the page.
Thanks for the help!))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2017-08-29
@AlexMaxTM

Most likely not to "sniff" but to "parse" the page using curl and php.
Make the first access to the index page and get the cookies that the server will give you. If authorization is required, then authorize. And then, with the help of the cookies received after authorization, go to the desired page and receive data for authorized users.
The received cookies can be viewed in the file that you specify when you initialize curl .

L
Lander, 2017-08-29
@usdglander

How to pass cookies with second request in cUrl? - Have you tried searching? :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question