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.
need help on creation and reading of login text fileneed help on creation and reading of login text file
Page 1 of 1
2 Replies - 1235 Views - Last Post: 14 May 2007 - 06:24 PM
Replies To: need help on creation and reading of login text file
#2
Re: need help on creation and reading of login text file
Posted 14 May 2007 - 09:44 AM
C or C++?
#3
Re: need help on creation and reading of login text file
Posted 14 May 2007 - 06:24 PM
i did it in C++ . It best if i can see some c++ code, but c will do too . i know both c and c++.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|