简体   繁体   English

将Cookie存储到浏览器缓存中并使用php检索它

[英]Storing cookies into browser cache and retrieve it with php

Can we store cookies into browser cache and retrieve it with php? 我们可以将cookie存储到浏览器缓存中并使用php检索它吗?

Here we are: http://samy.pl/evercookie/ 我们在这里: http : //samy.pl/evercookie/

I can see the following: 我可以看到以下内容:

 - Storing cookies in RGB values of auto-generated, force-cached 
    PNGs using HTML5 Canvas tag to read pixels (cookies) back out

 - Storing cookies in Web cache 

Does it possible? 有可能吗 i have searched in google about examples or explanations, but nothing at all. 我已经在Google中搜索过有关示例或解释的信息,但一无所获。

PHP cannot "retrieve" anything from the browser. PHP无法从浏览器“检索”任何内容。 That's because the browser talks to PHP in a request-response pattern over HTTP. 那是因为浏览器通过HTTP以请求-响应模式与PHP对话。 The browser sends an HTTP request and PHP responds to it. 浏览器发送一个HTTP请求,PHP对此做出响应。 All PHP can see is whatever the browser voluntarily submits in the HTTP request, and that's a certain specified number of things, none of which are anything from its cache. PHP所能看到的就是浏览器在HTTP请求中自愿提交的内容,这是一定数量的东西,这些东西都不是其缓存中的任何东西。 var_dump($_SERVER) to see what you get; var_dump($_SERVER)看你得到什么; there's nothing more and no way for PHP to "get" more. 没有更多的东西,PHP也无法“获得”更多的东西。

If you want to read things like certain evercookie values which have been planted through Javascript, you need Javascript to read them again client-side. 如果您想读取通过Javascript植入的某些evercookie值之类的内容,则需要Javascript才能在客户端再次读取它们。 This Javascript may then explicitly send that information anywhere it pleases, including back to your server. 然后,该Javascript可以在任何需要的地方显式发送该信息,包括发送回您的服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM