   open, edit, close text file on the internet
  My game has a highscore feature that I want to make available across the internet. How can I do it?(open a text file on the internet) The scores are saved in a text file, and the game processes and displays them.~Minas   
  Do a HTTP POST request to a web server, that can save the file in a database.Libraries like CURL (for C/C++) or System.Net.WebClient (for C#) make this really easy.The problem is that people will fake the .txt file to inflate their scores. There is pretty much nothing you can do about this.;Quote:Original post by hplus0603Do a HTTP POST request to a web server, that can save the file in a database.Libraries like CURL (for C/C++) or System.Net.WebClient (for C#) make this really easy.Thank you! I did a quick test with it and it's very easy to read the contents of an http file. I'll check the documentation later to see how I can read from text files (because I was getting some scrapped characters - and they weren't even unicode on the source .txt file).BTW I will need to find a web server right? Does a free one will be ok? (I guess it will because I only need it to read/write to a file, not for online gaming).Quote:Original post by hplus0603The problem is that people will fake the .txt file to inflate their scores. There is pretty much nothing you can do about this.What if people don't know the url the game connects to? The url will be inside the game code?Thanks again.;Quote:What if people don't know the url the game connects to? The url will be inside the game code?People have access to:The memory of your running process.The executable code of your running process.The network card in their computer.The wires going out from their computer.The firewall that routes the traffic to your server.Each of these points will let them learn about your "secret." Easiest would probably be to run Wireshark, which will let you capture the URL right on the wire.If you try to encrypt the data on the wire, there is still the problem that you have to decrypt it in memory. If users care enough about your high scores, then they will simply scan through the memory of your process and edit the highscore data in place before it's being encrypted.