Create logout.php

This commit is contained in:
tripathyr 2021-11-19 18:31:24 +05:30 committed by GitHub
parent 60d8d7443f
commit e1a96ca77e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

17
ajax/logout.php Normal file
View File

@ -0,0 +1,17 @@
<?php
session_start();
$_SESSION['authenticated'] = false;
ob_end_clean();
ob_start();
if (isset($_COOKIE['exchange'])) {
unset($_COOKIE['exchange[flo_id]']);
setcookie('exchange[flo_id]', null, -1);
unset($_COOKIE['exchange[session_id]']);
setcookie('exchange[session_id]', null, -1);
unset($_COOKIE['exchange[flo_pub_key]']);
setcookie('exchange[flo_pub_key]', null, -1);
unset($_COOKIE['exchange']);
setcookie('exchange', null, -1);
}
session_destroy();
?>