emu10k1
asked on
Compress cookie data
Hello experts. I have a site that needs to put much data in cookies, like 8000bytes but the Apache has the header field limitted to 8192. But I have to use cookies. There is a way to compress the cookies? If no, what you suggests to me? Thanks and its urgente
ASKER
I was using Session but i had to use cookies forced.. i got solve this problem using post vars with hidden fields... because post vars can have large amount of data.. thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sessions are where a cookie is sent initially to the client containing a key such as fcc17f071bca9bf7f85ca28109
To use sessions in PHP you need to call session_start() at the beginning of your script, then store whatever data you need to maintain between requests in the $_SESSION array:
$_SESSION["some_value"]=5;
print $_SESSION["some_previously
An example, which implements a separate counter for each client/browser that accesses the page (refresh to increase the count):
<?php
session_start();
if(!isset($_SESSION["count
$_SESSION["count"]=1;
} else {
$_SESSION["count"]++;
}
print "You have accessed this page ".$_SESSION["count"]." times<br />";
?>
Hope that's of use...