Guest User

Untitled

a guest
Feb 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2. setcookie('unsafe', 'true');
  3. setcookie('safe', 'true', 0, '', '', '', TRUE);
  4.  
  5. if ($_COOKIE['unsafe'])
  6. echo 'unsafe<br>';
  7. if ($_COOKIE['safe'])
  8. echo 'safe<br>';
  9.  
  10. ?>
  11. <script>
  12. if (/ safe/.test(document.cookie))
  13. document.write('FAIL');
  14. else
  15. document.write('PASS');
  16. </script>
Add Comment
Please, Sign In to add comment