I can find several.This code is outside a PHP block, so will be printed, not executed. Also, setting it to the static value 'QUERY_STRING' seems useless to me. I would suspect that you meant $_SERVER['QUERY_STRING'].
<p>The query string is: <?php echo $_SERVER[$url]; ?></p>
Variable names are case-sensitive. You defined $URL, not $url. The paragraphs are also outside an HTML body.
<p>Filename: <? echo $_GET['filename'] ?></p>
You haven't actually done anything with this, but it sounds dangerous, since it implies that you're going to allow the client to pass you a filename without doing any validation on it.
$url="www.en4cer.co.uk/downloads/".$url
Here you define $url, but since $url currently isn't defined, $url is 'www.en4cer.co.uk/downloads/'. Since it's to be passed as a header, this should be a full URL, including protocol. Also, you missed a semicolon.
header ("Location: $URL");
Equivalent to:
Code:
header ('Location: QUERY_STRING');
<html>
<title>Ades Design</title>
<head></head>
<body>
</body>
</html>
No DOCTYPE was provided, the title should be inside the head, and you're still in PHP parsing mode. Also, this code will never (or should never) be read. I suppose it's not a bad idea to provide something for unusual clients, though, even if those clients don't support HTTP fully.
Code:
<?php
$url = 'http://www.en4cer.co.uk/downloads/' . $_SERVER['QUERY_STRING'];
header("Location: $url");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ades Design</title>
</head>
<body>
<p>
Warning: your browser does not support
HTTP correctly. It is likely that a large portion
of the Web will be broken for you.
</p>
<p>
You should have been sent to <a href="<?php print $url; ?>"><?php print $url; ?></a>.
</p>
</body>
</html>
Bookmarks