|
Posted by powellgg on 12/20/06 07:15
I've just taken over a PHP website and am converting it to ASP.NET
(don't shoot!). I'm not a PHP guy so I'm doing a lot of searching for
things that I aren't obvious, and I'm hoping I'll be able to get help
from here for things I can't find on the Internet. Here's the first...
Here's the PHP code:
setcookie("site_search_keyword","", time() - 3600);
$site_search_keyword =
unserialize(base64_decode($site_search_keyword));
Microsoft's PHP to ASP.NET convert translated it to this:
PHP.HttpSupport.SetCookie("site_search_keyword", "",
PHP.DateTimeSupport.Time() - 3600);
site_search_keyword =
PHP.TypeSupport.ToString(unserialize(base64_decode(site_search_keyword)));
..Net has no corresponding method for unserialize() and I can't find
where the page/site does the initial serialization. Is there an
underlying serialization when it is creating the cookie? If the first
line is setting a null value to the cookie, why would the second line
try to read it? It's going to be the same every time... right?
[Back to original message]
|