• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

PHP and WebView - Cookie doesn't are the same

phpandroidcookieswebviewlogout


PHP Snippet 1:

CookieManager.getInstance().cookieManager.flush();

PHP Snippet 2:

setcookie("USER_ID", 0, time()-3600);
unset($_COOKIE['USER_ID']);
header('Location: ./index.php');

PHP Snippet 3:

<?php
session_start();
session_destroy();

// thats all
// you can unset all php sessions if you wants
?>

Related Snippets

PHP block shortcut in Visual Studio Code

Yii2: How do I debug console commands?

woocommerce get_order_report_data to show order_item_id

Converting array to string and then back in PHP

Unable to run composer install

Correct way to use LIKE '%{$var}%' with prepared statements?

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Display the default discounted price and percentage on Woocommerce products

Array to string conversion

how to redirect the user back to desired URL after login page in PHP?

Destroy session upon refresh

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

Display a product custom field only in WooCommerce Admin single orders

How can I format this number correctly using PHP?

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

About Contact Privacy policy Terms and conditions