Leaderboard | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Leaderboard

how can I make something like a leaderboard online and any device can update it?

17th Jan 2017, 9:32 AM
tim wong
tim wong - avatar
1 Answer
+ 1
You need a web server, a database and your leaderboard page. You create some apps, for example an Android and IOS game. At some point, user of a game gets some score. At that moment, you call your web server with HTTP POST request and add that players score to leaderboard. Server writes that score to database. Then you need your leaderboard page, which also calls the server (with HTTP GET request), and server returns it current leaderboard state from database. With this approach you can connect any number of players on different platforms. To code this, I would use something eazy like python SimpleHttpServer with MySQL dabase and ajax calls from javascript.
20th Jan 2017, 7:34 AM
Josip Tomić
Josip Tomić - avatar