Jump to content

Recommended Posts

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.