public
Description:
Homepage: http://isneilannoyedby.com
Clone URL: git://github.com/NeilCrosby/isneilannoyedby.git
isneilannoyedby / process.php
100644 34 lines (28 sloc) 0.531 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
 
function removeMagicQuotes (&$postArray, $trim = false)
{
  if (!get_magic_quotes_gpc())
  {
    return;
  }
 
  foreach ($postArray as $key => $val)
  {
    if (is_array($val))
    {
      removeMagicQuotes ($postArray[$key], $trim);
    } else {
      if ($trim == true)
      {
        $val = trim($val);
      }
      $postArray[$key] = stripslashes($val);
    }
  }
}
 
removeMagicQuotes($_GET);
 
if ( isset($_GET['hate']) ) {
    header("Location:/".urlencode($_GET['hate']));
    exit();
}
 
header("Location:/");
 
?>