Need code converted to work with PHP allow_url_include = off
Posted: Thu Jun 24, 2010 1:00 pm
Hello. I'm trying to get a website to fully function, however I need a piece of PHP code to be converted so that it works with the allow_url_include being off. It needs to be off for another part of the website to work. Here is the code:
$code = $_GET["code"];
$fileaccess = $_GET["fileaccess"];
if (!isset($code)) { $code = ""; }
if (!isset($fileaccess)) { $fileaccess = "index.html"; }
include("http://mydomain.org/modules/Safe_Box/co ... fileaccess");
What happens is that part of the URL the user inserts looks like this: "?code=somecode&fileaccess=somefile.xxx" where code is a secret password the user has, and fileaccess is the name of the file to access.
Code is a name of a folder on the server, and inside that code is the file fileaccess. When no fileaccess value is supplied, the website assumes the user wants the index.html page inside that code folder.
I do realize this is not a completely safe method for securing files, but I have nothing private inside this system. This is simply like a "rewards system" where the user obtains a code and can download an mp3 or a picture of some sort.
Any help would greatly be appreciated. Thanks!
$code = $_GET["code"];
$fileaccess = $_GET["fileaccess"];
if (!isset($code)) { $code = ""; }
if (!isset($fileaccess)) { $fileaccess = "index.html"; }
include("http://mydomain.org/modules/Safe_Box/co ... fileaccess");
What happens is that part of the URL the user inserts looks like this: "?code=somecode&fileaccess=somefile.xxx" where code is a secret password the user has, and fileaccess is the name of the file to access.
Code is a name of a folder on the server, and inside that code is the file fileaccess. When no fileaccess value is supplied, the website assumes the user wants the index.html page inside that code folder.
I do realize this is not a completely safe method for securing files, but I have nothing private inside this system. This is simply like a "rewards system" where the user obtains a code and can download an mp3 or a picture of some sort.
Any help would greatly be appreciated. Thanks!