need help on creation and reading of login text file

need help on creation and reading of login text file

Page 1 of 1

2 Replies - 1498 Views - Last Post: 14 May 2007 - 06:24 PM Rate Topic: -----

#1 gibbsen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 14-May 07

need help on creation and reading of login text file

Posted 14 May 2007 - 05:50 AM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: need help on creation and reading of login text file

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: need help on creation and reading of login text file

Posted 14 May 2007 - 09:44 AM

C or C++?
Was This Post Helpful? 0
  • +
  • -

#3 gibbsen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 14-May 07

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++.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1