<?
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251" />
</head>
<form method="post" action="">
http://btv.bg/<input type="text" name="dir"/><input type="submit" name="submit" value="submit"/>
</form>
<?
$url="http://btv.bg/";
if (isset($_POST['submit']))
{
$dir=htmlspecialchars(trim($_POST['dir']));
if (empty($dir))
{
echo "Празно поле !";
}
else
{
$newdir=preg_replace('/\//', '', $dir);
$newdir=preg_replace('/ /', '', $dir);
header("location:$url/$newdir");
}
}
?>
<?php
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251" />
</head>
<form method="post" action="">
http://btv.bg/<input type="text" name="dir"/><input type="submit" name="submit" value="submit"/>
</form>
<?php
$url="http://btv.bg/";
if (isset($_POST['submit']))
{
$dir=htmlspecialchars(trim($_POST['dir']));
if (empty($dir))
{
echo "Празно поле !";
}
else
{
$newdir=preg_replace('/\//', '', $dir);
$newdir=preg_replace('/ /', '', $dir);
echo"$url/$newdir");
}
}
?>