Sounds like you'll store information on each line of the file so [man]file/man looks like a good function for this job. [man]file/man will open the entire file though so if it's large or if you want to be efficient, use [man]fopen/man and [man]fgets/man.
After using file, loop through the array with [man]foreach[/man] and compare the data. You'll want to [man]explode/man each line for the username and password, and do this explode within the loop, along with your checking.