PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?
getpage($_GET["p"]);
function getpage($page)
{
// notice the $page00 its for security reasons so the user doesnt "guess" the filename
if ($page == "106")
{
$page = "home";
}
elseif ($page == "d6f"
{
$page = "roster";
}
else
{
$page = "home";
}
include $page."00.php";
//if (empty($page))
//{
//$page = "home";
//}
//$page = $page.".php";
//include $page;
}
?>
Okay I'm trying to design a template for this clan which has the layout and depending on which variable is loaded... simple task.... but on my companies website of this gaming portal demo of this system we want it to be secure without having elseif isloaded load this page.. because it can get quite long..
i want to have something more or less like the commented version.. but is obviously not secure...
well.. if you have some form of encoding that short form, you can reverse it.. Alternately, you could "register" the short for in a database (flat-file or sql, whatever) and "resolve" it...
shouldn't take long to run.. although it will almost always make more bytes than needed to encode a given string/bytestream... If you want short forms.. I'd go a database route to store what they are supposed to be..