I came across this in my sever. What does this do?
<p>I came across this in my sever. And I was wondering what these PHP codes do.</p>

<pre><code>&lt;?php
    $request_method = $_SERVER["REQUEST_METHOD"];
    if($request_method == "GET"){
      $query_vars = $_GET;
    } elseif ($request_method == "POST"){
      $query_vars = $_POST;
    }
    reset($query_vars);
    $t = date("U");

    $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
    $fp = fopen($file,"w");
    while (list ($key, $val) = each ($query_vars)) {
     fputs($fp,"&lt;GDFORM_VARIABLE NAME=$key START&gt;\n");
     fputs($fp,"$val\n");
     fputs($fp,"&lt;GDFORM_VARIABLE NAME=$key END&gt;\n");
     if ($key == "redirect") { $landing_page = $val;}
    }
    fclose($fp);
    if ($landing_page != ""){
    header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
    } else {
    header("Location: http://".$_SERVER["HTTP_HOST"]."/");
    }


?&gt;
</code></pre>

<p>All I see is headering me to the a new destination?</p>
