I am runing this script:
<?
$val = $_GET['id'];
$val .= ".php";
$dirty = array(".."
;
$clean = array(""
;
$val = str_replace($dirty, $clean, $val);
if (isset($_GET['id'])) {
if (file_exists($val)) {
include "$val";
}
else {
include "404.shtml";
}
}
else {
include "home.php";
}
if (file_exists($val)) {
include_once "$val";
}
?>
And it will not include any of the pages, what do i have to do?
as well this script wont work either:
<?
srand((double)microtime()*1000000);
function banner($select, $host, $host2)
{
$eattempted = true;
$lines = file("banners.txt"
;
$count = count($lines);
$random = rand(0,$count-1);
$selected = $lines[$random];
$pieces = explode(",", $selected);
IF ($host == $pieces[0] OR $host2 == $pieces[0])
{
banner ("display", $host, $host2);
}
ELSE
{
echo ("<center><A HREF=\"$pieces[0]\"><IMG SRC=\"$pieces[1]\" BORDER=0></A></center>"
;
}
}
$host = "[
"]; . $HTTP_HOST;
$host2 = str_replace("www.","",$host);
IF (!isset($attempted))
{
banner ("display", $host, $host2);
}
?>
Thanks
-James