Hello all, i am go9090go.
Today i made a domains for a jar file people can upload from my website.
I made this to make the jar file close source and its easy to update.
Now i made a java classloader and everything i made works.
The classloader call a php document with the password and username.
The pass and name will be checked inside a databse and if its inside i use
header() to load the jar file.
But when i just go to my main domain i get the index of the site and people can easly download the jar file without have to walk thru the php pass checker.
So i want to place the jar file inside a protected folder,and i want that only way you get acces to this jar is by the php file. How can i get a file from a protected folder?
here is the php used when the jar file is not inside a protected folder:
$DBName = "name";//name database
$DBUser = "name";//user
$DBPassword = "pass"; //passs
$DBHost = "host"; //might be different
mysql_connect($DBHost, $DBUser, $DBPassword);
$username = $_GET['username'];
$password = $_GET['password'];
$IP = $_SERVER['REMOTE_ADDR'];
$string = "Java";
$pos = strpos($agent, $string);
if (!strpos($_SERVER['HTTP_USER_AGENT'], "Java"))
echo("Your Auth has been banned for trying to breach security.");
//mysql_query("delete from users where username='$username'");
$query = "select * from users where name='$username' and pass='$password'";
$num = mysql_affected_rows();
if ($num > 0)
now i want to use the header to a file inside a folder that is protected :
so how can i make the header() methode to open script.jar inside a protected folder.
The folder haves name and pass: blabla,balbla for exempel
thx for help