JAY is the windows privat server problem fixed????????
JAY is the windows privat server problem fixed????????
Hi Jay
Long time no seen as we say in denmark.
Is the private server function fixed in the new version for IIS servers? im asking becource i have a password script ill like to use in my version (1.0 beta 5) but i get some errors, maby you can help me out here.. i have the password protect script and is testet and work, but when i include it in the index file i get some errors. pleaseeeeeeeeeee help.
yours
kento (webmaster @ 2stepback.dk)
cant upload the script here so can´t show you the password script, is there a way to do it?. maby you can use that script in your great radio system here.
Long time no seen as we say in denmark.
Is the private server function fixed in the new version for IIS servers? im asking becource i have a password script ill like to use in my version (1.0 beta 5) but i get some errors, maby you can help me out here.. i have the password protect script and is testet and work, but when i include it in the index file i get some errors. pleaseeeeeeeeeee help.
yours
kento (webmaster @ 2stepback.dk)
cant upload the script here so can´t show you the password script, is there a way to do it?. maby you can use that script in your great radio system here.

it was about this jay
Hi JayJay wrote:can you remind me of what this was about? I have not done any development on mp3 toolbox in a while it is open source and I would love for php devs to take on adding features.
it was about when you set the system so it runs as a privat. it should come up with a username/code box, and many iis servers had problems with running that kind of option, and it worked at the end on my iis server but have upgrated my iis and now it wont work, BUT i have a password system that can be incluede in the index.php script so it dosn´t have to use the servers auth. it self, but cant find out how to include it, maby you can, if you want i can send it by email to you if you give me your email here in the forum, its only one php file, and is freeware (so we can use it as we see fit) and maby that will solve many peoples problem with the auth system build in the program you have made.. at least if you can make it work in my script ill be more than happy Jay.
yours
kento.
that may beJay wrote:well we use PHP methods to startup the HTTP auth process and if IIS doesn't support this then the issue is with PHP and IIS.


here it comes:Jay wrote:post the script and I will do my best to give you some pointers.
<?php
###############################################################
# Page Password Protect 2.1
###############################################################
# Visit http://www.zubrag.com/scripts/ for updates
###############################################################
#
# Usage:
# Set usernames / passwords below between SETTINGS START and SETTINGS END.
# Open it in browser with "help" parameter to get the code
# to add to all files being protected.
# Example: password_protect.php?help
# Include protection string which it gave you into every file that needs to be protected
#
###############################################################
/*
-------------------------------------------------------------------
SAMPLE if you only want to request login and password on login form.
Each row represents different user.
$LOGIN_INFORMATION = array(
'zubrag' => 'root',
'test' => 'testpass',
'admin' => 'passwd'
);
--------------------------------------------------------------------
SAMPLE if you only want to request only password on login form.
Note: only passwords are listed
$LOGIN_INFORMATION = array(
'root',
'testpass',
'passwd'
);
--------------------------------------------------------------------
*/
##################################################################
# SETTINGS START
##################################################################
// Add login/password pairs below, like described above
// NOTE: all rows except last must have comma "," at the end of line
$LOGIN_INFORMATION = array(
'user1' => 'kode1',
'user2' => 'kode2'
);
// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', true);
##################################################################
# SETTINGS END
##################################################################
///////////////////////////////////////////////////////
// do not change code below
///////////////////////////////////////////////////////
// show usage example
if(isset($_GET['help'])) {
die('Include following code into every page you would like to protect, at the very beginning (first line):<br><?php include("' . __FILE__ . '"); ?>');
}
// logout?
if(isset($_GET['logout'])) {
setcookie("verify", ''); // clear password;
die("Logged out.");
}
if(!function_exists('showLoginPasswordProtect')) {
// show login form
function showLoginPasswordProtect($error_msg) {
?>
<html>
<head>
<title>Please enter password to access this page</title>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
<body>
<style>
input { border: 1px solid black; }
</style>
<form method="post">
<h3>Please enter password to access this page</h3>
<font color="red"><?php echo $error_msg; ?></font><br />
<?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'; ?>
<input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" />
</form>
<br />
<a style="font-size:9px" href="http://www.zubrag.com/scripts/password-protect.php" title="Download Webpage Password Protect">Powered by Webpage Password Protect</a>
</body>
</html>
<?php
// stop at this point
die();
}
}
// user provided password
if (isset($_POST['access_password'])) {
$login = isset($_POST['access_login']) ? $_POST['access_login'] : '';
$pass = $_POST['access_password'];
if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION)
|| (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) )
) {
showLoginPasswordProtect("Incorrect password.");
}
else {
// set cookie if password was validated
setcookie("verify", md5($pass));
}
}
else {
// check if password cookie is set
if (!isset($_COOKIE['verify'])) {
showLoginPasswordProtect("");
}
// check if cookie is good
$found = false;
foreach($LOGIN_INFORMATION as $kay=>$val) {
if ($_COOKIE['verify'] == md5($val)) {
$found = true;
break;
}
}
if (!$found) {
showLoginPasswordProtect("");
}
}
?>