<?php
$url_array  = explode("/",$_SERVER['REQUEST_URI']);
$url_length = sizeof($url_array);
if (isset($url_array[2])) {
   $url_array[2] = substr($url_array[2], 0,strpos($url_array[2], '.'));
} else {
   $url_array[2] = "";
}
if (strlen($url_array[2])>0) {
   $new_ulr_value = 'http://nospam-pl.net/'.$url_array[2].'.php';
} else {
   $new_ulr_value = 'http://nospam-pl.net/';
}
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$new_ulr_value);
header("Connection: close");
// echo ($new_ulr_value);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<META http-equiv="Refresh" content="6; URL=<?=$new_ulr_value?>">
<title>Nospam-pl.NET</title>
<link rel="StyleSheet" href="/style.css" type="text/css">
</head>
<body>
<center>
<h2>Strona przeniesiona do witryny <a href="http://nospam-pl.net/">Nospam-PL.NET</a></h2>
<p>Nowy adres strony: <b><a href="<?=$new_ulr_value?>"><?=$new_ulr_value?></a></b></p>
<p>Kliknij odnośnik, jeśli nie zostaniesz przeniesiony automatycznie w ciągu 5 sekund.</p>
</center>
<body>
</html>

