I am looking to make a Napster like program, I already have the code for displaying what I need to, and also transfering files from one computer to another directly, but here's my plan:

The user logs on to the program, it makes a text file and finds all of the files the user would like to share on this program.. uploads it to a server where it has the username as the filename (ex. myusername.txt), so that text files can't overwrite each other and that no two people have the same name. Now when the user goes to search for a file, it goes to the server and searches through all the text files, getting the results it needs, then returns them to the user. When the user clicks on a file.. it finds username.txt, opens it, and begins the download from the ip and the location of the users hard drive.

All I need to know is how can i search through text files on the internet.. or maybe I could compile them into one list and search through one file. If I do that, then when the user logs off I will need to know how to delete certain lines of the text file?

So, I guess what I am mainly asking is..

1. How can I search through multiple files, or just one file on the internet?

2. How can I go about deleting single user files, or certain lines from the main file (if I make it one big list)?

3. And if I could get peoples opinion on how I should go about this whole connect/upload/search/download process?

I am using WINSOCK to connect to other peoples computer and download certain files, but I already have that code.


Thank You everyone for your support!
- azpc