[java] Save hiscor on a server.

Started by
2 comments, last by Peter Svensson 22 years, 4 months ago
Hi! Anyone knows how to save a hiscore list over the internet in java? We want to have only one "central" hiscore list. We are going to create an account on angelfire or somthing for the hiscore so the access security isnt a problem for us... Code or any suggestions are wellcomed... // Peter - Thanx!
Advertisement
We''ve done it 2 ways, there are probably more.

1. TCP: open up a socket and send the score.
2. HTTP: send the score to a webserver using a special URL string

-M
I just had this problem, and the solution that I found was to put readLine() into an inner class. You can create a thread inner class that only stay listen the socket response. When it receives the answer, stores in a variable and set another var to warn you that a new answer is there.
I apologize for my english...

I would open an http connection to a php script. Speaking a simple protocol to the script, or using xml-rpc to send information about the score and the player''s name. Tossing in some sort of authentication token could stifle cheating. The web server script could easily access a database or falt file and save the information.

This topic is closed to new replies.

Advertisement