Was wondering if anybody would care to look over this include script snippet, using the controversial index.php?x= and argue if it's secure or not.
<?php
function antihack($value)
{
$value1 = str_replace( "http", "<b>Huh?!</b> ", $value );
$value2 = str_replace(":", "<b>Trying to hack me?</b> ", $value1 );
$value3 = str_replace( "//", "<b>Sucks to be you</b> ", $value2);
$value4 = str_replace( "www", "<b>neener, neener</b> ", $value3);
return $value4;
}
$page="main.php";
$content=$_GET['x'];
if ($_GET['x'] == "") $content = $page;
else $content=$_GET['x'];
$content = antihack($content);
include($content);
?>