Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.