Hi I made some changes to this script but still it is not working > > cyc> function authenticate($user,$pass) { > cyc> $result = -1; > cyc> $data = file("shadow"); /* permission > every > cyc> one read */ > > cyc> foreach($data as $line ) { > cyc> $arr = explode(":",$line); > cyc> if($arr[0] == $user) { > cyc> /* user name matching */ $salt = substr($arr[1],0,2); > cyc> if(crypt(trim($pass),$salt) == > $arr[1]) > cyc> { $result = 1; > cyc> break; > cyc> } > cyc> else > cyc> { > cyc> $result = 0; > cyc> break; > cyc> } > cyc> } /* end of for */ > cyc> return $result ; > > cyc> } > > > cyc> The above programme always returs -1. > > cyc> Any help would be appreciated. > > cyc> regards > cyc> CVR > > >
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php