I have to save high scores online. I've got a small Java applet that allows a person type a particular sentence while being timed. It will save the greatest score (really least time for you to type the sentence). Think it is here: http://davidemole.co.cc/typing.html

It had been initially a desktop application where I made use of a text file in order to save all of the 'sentences' and 'record times' also it was simple to save new records. Since this is an applet, this program still reads sentences from the textfile, but new records cant be saved. My problem is going to be solved basically used a database. I've produced a database on the free hosting server having a table that consists of 'Sentence' and 'RecordTime'. I attempted hooking up however it unsuccessful. I understand how to read to some DB from the Java code. Connection is my problem.

I'm a newbie to DB programming but my research online has proven that for security reasons, you cannot connect with a db from an applet. Suggestions include utilizing a php script to obtain the data from DB, store in xml after which applet reads/write from/to xml. (i've no understanding of php)

Can anybody show me how you can go the php-xml-applet path? An example code may help.

Every other suggestion regarding how to solve my overall problem (save scores online) is going to be appreciated.

Thanks millions of.

You can just write a servlet for the applet and employ HttpURLConnection to transmit data for your servlet


Within the situation you have to send data a lot more than 30Mb you should use apache httpComponents from here


To prevent applet signing you need to place servlet and applet on a single host root

Best of luck