Jump to content

can u help in cookies


vidhatanand

Recommended Posts

Here is hte code I did jsut as a test.

but basically, and I dont know if this is even possible. I want to place a cookie, and then based on how fast that cookie is places, as in if it takes too long, like a second, then place other cookies or not.

If someone has a prompt for cookies, then I want it to place the one and no more.

Theory is if they have the prompt it will take time to place the cookie, and give hte program enough info to decide toplace others.

 

<?php

 

//Set test cookie

setcookie("test", "test", time()+3600);

 

if (isset($_COOKIE["test"]))

  {

    //Set Real cookies

  setcookie("first", "first", time()+3600);

  setcookie("second", "second", time()+3600);

 

//Write Cookies

echo "Cookie " . $_COOKIE["test"] . "!<br />";

echo "Cookie " . $_COOKIE["first"] . "!<br />";

echo "Cookie " . $_COOKIE["second"] . "!<br />";

  }

else

echo "No Cookie!<br />";

 

 

//Delete cookies

 

?>

Link to comment
https://forums.phpfreaks.com/topic/126857-can-u-help-in-cookies/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.