user2203703
user2203703

Reputation: 2005

Storing cookies into browser cache and retrieve it with php

Can we store cookies into browser cache and retrieve it with php?

Here we are: 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.

Upvotes: 1

Views: 267

Answers (1)

deceze
deceze

Reputation: 522597

PHP cannot "retrieve" anything from the browser. That's because the browser talks to PHP in a request-response pattern over HTTP. The browser sends an HTTP request and PHP responds to it. 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. var_dump($_SERVER) to see what you get; there's nothing more and no way for PHP to "get" more.

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. This Javascript may then explicitly send that information anywhere it pleases, including back to your server.

Upvotes: 1

Related Questions