elmanisero

delete cookie password page

Feb 28th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. // turn all cookies into string
  3. $cookie_string = implode(array_keys($_COOKIE));
  4. // find position of desired cookie
  5. $pos = strpos($cookie_string,'wp-postpass');
  6. // extract string starting at $pos
  7. $pass_cookie = substr($cookie_string,$pos);
  8. // set cookie to expire on browser close
  9. setcookie($pass_cookie,'',0);
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment