D
D
dmitryosipov2014-09-06 18:53:00
JavaScript
dmitryosipov, 2014-09-06 18:53:00

How to get whole cookies?

Through PHP function $_COOKIE I want to receive cookie data. Then I write it to a file and output it. But in the file I don't get any data, but I get a string where it says "Array" . but I would like to receive full data, or at least values:
// name - cookie name
// value - cookie value
// [expires] - cookie expiration date (by default - until the end of the session)
// [path] - path, for which the cookie is valid (default is the document in which the value was set)
// [domain] is the domain for which the cookie is valid (default is the domain in which the value was set)
// [secure] is a boolean indicating whether secure transmission of the cookie value is required

How to get this data and write it down? Is it possible to get this data via $_COOKIE? I tried $_SERVER['HTTP_COOKIE'] - so there is generally an empty line

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Evgrafovich, 2014-09-06
@Tantacula

And you also have catastrophically little knowledge on the issue of "how to use Google and Yandex." These are Yandex metrics cookies.

V
vdem, 2014-09-06
@vdem

1) These are cookies. Yes, these are cookies. Variety.
2) You need to know how they are encrypted.

M
Marina Lebed, 2015-07-20
@idmarina_lebed

Maybe this will help. In any browser, copy and paste this
code .javascript:alert( document.cookie ) "required with a dot" because for security reasons, browsers delete javascript in the address bar. When you insert the script, use the handles to remove the unnecessary point. And you press enter and you will be given a cookie in the form of a message. It is possible to send to your host using a java script. If you need to write, I will give the code and explain how!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question