CookieHandler::ReadTextContent()


Definition

Returns the content set in the cookie with the current name as string.

String ReadTextContent ()

Returns

Exception

Example

// Getting the cookie with last visited website
$LastWebsiteCookie = new CookieHandler ("LastWebsite");
// Getting the cookie with last logged in user
$LastUserCookie    = new CookieHandler ("LastUser");
 
$LastWebsiteContent = '';
$LastUserContent    = '';
 
try 
{
   $LastWebsiteContent = $LastWebsiteCookie->ReadTextContent ();
   $LastUserContent    = $LastUserCookie->ReadTextContent ();
}
catch (CookieHandlerException $e)
{
   // [...]
}