Zubrag.com :: Forum

zubrag.com => Password Protect => Topic started by: 00tank on February 11, 2008, 12:53:05 AM



Title: pass and username to a flatfile
Post by: 00tank on February 11, 2008, 12:53:05 AM
 hi i changed

$LOGIN_INFORMATION = array(
  'zubrag' => 'root',
  'admin' => 'adminpass'
);

to



$pass_file = "pass.txt";
$fp = fopen($pass_file, "r");
$passes = fread($fp, filesize($pass_file));
fclose($fp);

 because I want the usernames and passes to be read from that file by another script also, now this works fine if i just use the password only option as the passes are written on the .txt file

pass1
pass2
pass3


and so on
but if i enable the username and password option and have written on my .txt file like this

pass1,username1
pass2,username 2

and so on it doesnt work ?

how do i make this work ? does it have to be written in the file a special way or more code needed to read them ? thx