Jump to content

cookie expires too early!


Bee

Recommended Posts

Hi,

I took a tutorial to make a text file based counter. The counter counts fine; however, it doesn't seem to register the cookie because whenever I refresh the page, it adds one to the count. [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /]

This is my cookie code:

setcookie("user_ip", $REMOTE_ADDR, time()+360000);

Any help will be very very much appreciated.
Link to comment
Share on other sites

[!--quoteo(post=380198:date=Jun 5 2006, 08:53 AM:name=Orio)--][div class=\'quotetop\']QUOTE(Orio @ Jun 5 2006, 08:53 AM) [snapback]380198[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can you show the counter script itself? I think the error is checking the cookie, not in setting it (because your setting is ok).

Orio.
[/quote]

I could not send my code, I keep getting an error message when I try to send the code:

"You are not authorized to view this page
You might not have permission to view this directory or page using the credentials you supplied."

But here is a link to the tutorial? My code is exactly the same except from the <br> statements that I removed.

[a href=\"http://www.phpfreaks.com/tutorials/27/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/27/0.php[/a]

Thank you,
Bee
Link to comment
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.