P
P
pase802018-11-14 21:14:45
PHP
pase80, 2018-11-14 21:14:45

PHP - is it possible to get the cookie of an external page?

Good afternoon, colleagues.
I wondered if using PHP to get cookies from an external page, set by JS when visiting this page.
Those. we have a PHP script (the server does not support the installation of additional framework modules, so we have to use standard methods), we have a page on an external server that, when visited, sets the name=helloworld cookie. It is necessary to get the value of the cookie name from the external page using the php script.
Tell me, please, is it possible to implement this, and if so - where to dig. If there is such an opportunity in another programming language, please inform and suggest where, again, to dig.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-11-14
@pase80

No.
You seem to be making some wild guesses on the wrong premises.

No, you do not need to get cookies from another domain from the client. You need to "go" to the site, get a cookie (as a visitor would get), find out this cookie. Like how a bot went to the site and found out what cookies this site assigned to it.
And if there were two users on the target "external site" before, whose cookie will you get, the first or the second? What if there were 1000?
The correct answer is: you won't get a draw at all. Cookies are not stored on the "website" at all, they are stored in the user's BROWSER, and are sent by the BROWSER. To find out other people's hooks, you will have to hack the victim's browser or the server that the victim comes to. Well, or intercept the traffic between them, and somehow decrypt it, if http s .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question