Skip to content

Instantly share code, notes, and snippets.

@joelemanoel
Last active May 20, 2021 21:29
Show Gist options
  • Save joelemanoel/0ee339e3fe9c3769a18ba6a3a841b3c1 to your computer and use it in GitHub Desktop.
Save joelemanoel/0ee339e3fe9c3769a18ba6a3a841b3c1 to your computer and use it in GitHub Desktop.
logout and terminal fix mk-auth
<script>alert('Terminal desativado. Contate a MKCloud para mais detalhes.'); location.href = '/admin/';</script>
<?php
session_start();
session_destroy();
if (isset($_SERVER['HTTP_COOKIE'])) {
$cookies = explode(';', $_SERVER['HTTP_COOKIE']);
foreach($cookies as $cookie) {
$parts = explode('=', $cookie);
$name = trim($parts[0]);
setcookie($name, '', time()-1000);
setcookie($name, '', time()-1000, '/');
}
}
Header("Location: /admin/");
?>
<script>alert('Terminal desativado. Contate a VolareHost para mais detalhes.'); location.href = '/admin/';</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment