soulsystem Posted April 4, 2005 Share Posted April 4, 2005 Dear PHPFreaks, Can any of you help me to hack-proof my website? It is a simple website for my rock band which uses index.php. I have to constantly monitor my site and remove the offending files. I keep getting hacked by various people around the world, who use my index.php to replace my files with theirs. 1. Can any of you help me to secure my index.php page so that it cannot access files outside of my server? 2. Is there some code I can add to the index to prevent it from grabbing files outside my server? THIS IS THE CURRENT CODE FOR THE INDEX.PHP: <?php $MainPage = "template.php"; // Main Template File $Content = "./page"; // Location of Content $PageExtension = ".php"; // What comes at the end of the x... $default = "home.htm"; require ("template.php"); ?> Thank you all for your help. Feel free to contact me at soul@tampabay.rr.com Sincerely, Steve Link to comment Share on other sites More sharing options...
Recommended Posts