<?php
/* 
<!DOCTYPE html>
<head>
	<title>
		EuroBioImaging subnode in Szeged, BRC
	</title>
</head>
<body>
	<h1>It works.</h1>
	<p>
		Contact: <a href="mailto:steinbach.gabor@brc.hu">steinbach.gabor@brc.hu</a>
	</p>
</body>
*/



$out=date("Y-m-d H:i:s");
$out.="\n";

/*
$out.=http_build_query($_GET);
$out.="\n";

$out.=$_POST['name'];
$out.="\n";
$out.=$_POST['email'];
$out.="\n";
$out.=$_POST['subject'];
$out.="\n";
$out.=$_POST['message'];
$out.="\n\n";

$out.=$_SERVER["REMOTE_ADDR"];
$out.=" - ";
$out.=$_SERVER["HTTP_CLIENT_IP"];
$out.=" - ";
$out.=$_SERVER["HTTP_X_FORWARDED_FOR"];
$out.=" - ";
$out.=$_SERVER["HTTP_X_REAL_IP"];
$out.=" - ";
$out.=gethostbyaddr($_SERVER['REMOTE_ADDR']);
$out.="\n";
$out.=http_build_query($_SERVER);
$out.="\n";

foreach ($_SERVER as $key => $value) {
	$out.=$key." = ".$value."\n";
}
$out.="\n";
*/
$out.="----------------------------------------------------------------------------------------------------------------------\n";
$out.="\n";

file_put_contents("log/log.txt", $out, FILE_APPEND);


$out=date("Y-m-d H:i:s");
$out.="\n";

$out.=http_build_query($_GET);
$out.="\n";


$out.=$_SERVER["REMOTE_ADDR"];
$out.=" - ";
$out.=gethostbyaddr($_SERVER['REMOTE_ADDR']);
$out.="\n";

/*
$out.=http_build_query($_SERVER);
$out.="\n";
*/
foreach ($_SERVER as $key => $value) {
	$out.=$key." = ".$value."\n";
}
$out.="\n";

$out.="----------------------------------------------------------------------------------------------------------------------\n";
$out.="\n";

file_put_contents("log/log_qq.txt", $out, FILE_APPEND);  

if($_GET['test']=='vamosi')
	header("location: https://eurobioimaging.brc.hu/site2/");
else
	header("location: https://eurobioimaging.brc.hu/site/");

?>
