|
Hi all,
I have a question here, i have done a simple ftp network sockets program. It works fine. Just that there is one part which i could not figure out how to do it. That is i need to create a login text file on my server end, so the server can authenticate clients that are trying to connect.
How can i read the whole file(login.txt) to compare against what the client enters ?. Take note that both the username and password are stored in the format as below in the text file. The admin word states that the user is an admin and is able to add users to that text file.
username password admin username2 password2 admin billy password10 user
How can i compare both the username and password ? what function do i need to use ? fseek ? Please kindly advise or if better please show some sample code. Thanks a lot. Really appreciate any form of help.
|