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_ke yword =
unserialize(bas e64_decode($sit e_search_keywor d));
Microsoft's PHP to ASP.NET convert translated it to this:
PHP.HttpSupport .SetCookie("sit e_search_keywor d", "",
PHP.DateTimeSup port.Time() - 3600);
site_search_key word =
PHP.TypeSupport .ToString(unser ialize(base64_d ecode(site_sear ch_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?
(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_ke yword =
unserialize(bas e64_decode($sit e_search_keywor d));
Microsoft's PHP to ASP.NET convert translated it to this:
PHP.HttpSupport .SetCookie("sit e_search_keywor d", "",
PHP.DateTimeSup port.Time() - 3600);
site_search_key word =
PHP.TypeSupport .ToString(unser ialize(base64_d ecode(site_sear ch_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?
Comment