Guest User

Untitled

a guest
Aug 18th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2.     if ($_SERVER['HTTP_REFERER'] == "http://what-ch.mooo.com/test-php/dark.php") {
  3.         header('Location: http://what-ch.mooo.com/test-php/dark.php');
  4.     } else {
  5.         header('Location: http://what-ch.mooo.com/test-php/index.php');
  6.     }
  7.  
  8.     $post = $_POST['content'];
  9.     $post = htmlspecialchars($post);
  10.     $post = filter_var($post, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
  11.  
  12.     if ($post !== "" && strlen($post) <= 200) {
  13.         file_put_contents("content.txt", $post . "\n" . file_get_contents("content.txt"));
  14.     }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment