Jump to content


Photo

cookie expires too early!


  • Please log in to reply
2 replies to this topic

#1 Bee

Bee
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 05 June 2006 - 09:05 AM

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.

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 05 June 2006 - 01:53 PM

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.
Think you're smarty?

(Gone until 20 to November)

#3 Bee

Bee
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 05 June 2006 - 09:41 PM

[!--quoteo(post=380198:date=Jun 5 2006, 08:53 AM:name=Orio)--][div class=\'quotetop\']QUOTE(Orio @ Jun 5 2006, 08:53 AM) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users