php - I came across this in my sever. What does this do? -
php - I came across this in my sever. What does this do? -
i came across in sever. , wondering these php codes do.
<?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,"<gdform_variable name=$key start>\n"); fputs($fp,"$val\n"); fputs($fp,"<gdform_variable name=$key end>\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"]."/"); } ?>
all see headering me new destination?
it stores info sent or post file (a gdform-file, whatever is) , redirects user specific page. i'm guessing it's log function of sort.
it might interesting through files though, since login credentials , such stored along other form/get-data.
php
Comments
Post a Comment