session - Information required about cookies in php -


i want enable cookies on site. used following code:

$cookie_name = 'testing_cookie'; $cookie_value = 'test_cookie_set_with_php'; ($cookie_name, $cookie_value, time() + (86400 * 30), '/'); // 86400 = 1 day 

i not sure put in "cookie_name", "cookie_value", for.

second want know user preference of pages, he/she visits on site. how can reports.

third saw message on cookies enabled site, asked ok terms using cookies on site. how can it?

i'll go through individual subquestions 1 one:

  1. cookies structure consisting of name (to differentiate them), value (your actual payload) , possibly few other fields. see php docs of setcookie() more in-depth explanation.

  2. if referring site analytics, there numerous off-the-shelf solutions available (which rely on cookies internally). google analytics (proprietary) , piwik (oss) 2 known examples of such software. further advice on picking best tool needs, please head on softwarerecs.

  3. this typically issue within european union. again, there numerous options readily available. list see here.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -