Hey guys!
I'm currently working on an JApplet that has to read and write .txt files on the webserver it is running on.
Reading is no problem, but writing is difficult. My temporary solution is:
The parameters name and score are then saved in a .txt file with php (GET).
The problem here is that I can cheat by e.g. entering www.website.com/game.php?name=Andy&score=9999999999
In my
applet I have more than the two variables in the example above, which makes the url long and ugly. Also, the website always has to reload the applet when it is writing files.
My Question now is:
How can I write files to the webserver without displaying the data to the user (and, if possible, without reloading the page)? I have searched the internet for over 1 week now and I haven't found a solution. Some people suggest using
Servlets and I have already seen some tutorials and example servlets, none of which has written data to the webserver's file system
. Others talk about policy files or signed applets, but I don't know how this works.
If someone knows a solution for my problem, could you please provide a small code example, like how to write "Hello World" in a file "www.website.com/data/hello.txt"? That would be awesome!
All other help is highly appreciated, too. ;)