To set a record, call: https://plassion.com/setrec.php (with the variables below)cod = code to write (private) uid = user id, integer (64 bits) val = integer (64 bits) txt = text, up to 32 characters
To get records, call: https://plassion.com/getrec.php (with the variables below)cod = code to read (public) qty = quantity of records, up to 100  sta = starting point [0 = first] dtb = datetime begin, yyyy-mm-ddThh:mm:ss [beginning of time] dte = datetime end, yyyy-mm-ddThh:mm:ss [end of time] typ = h d w m a (last hour, day, week, month, all, they can be used together) [none] [* Default values in brackets, if the variable is ommited]
- Be sure to use https to maintain your cod secure.
- POST is the safer method to set the variables (but GET is also available).
- As val is an integer, if you want to set/get float values, you have to multiple them by a factor before setting them, and divide the values
received by the same factor.
For instance, if you want to save best times with milliseconds (e.g. 25.347s) you can multiply the time by 1000 before setting it (saving it in total of milliseconds) and divide by 1000 when you get the bests times.
- The datetime used is always UTC/GMT. So, if you need to get records for a period of time in a different region, you need to recalculate the datetime in the specific time zone.
- In order to make it harder for a hacker to save cheated records, your game should obfuscate/encrypt the cod and val inside the code.
cod=your cod for get(read)
1) nothing else set [using default values] -> Receives only the best (highest or lowest) value ever saved.
2) qty=50 & sta=100 -> Receives the 50 values from positions  to . Remember that  is the first position.
3) qty=10 & dtb=2017-04-01T00:00:00 & dte=2017-04-30T23:59:59 -> Receives the top 10 values of April 2017.
4) qty=3 & typ=dwa -> Receives the best 3 values of the: day, week and all-time (9 values in total, if they exist of course).
The answer is in CSV format: Comma ( , ) separates the fields, and LF (\n) ends each line.
A possible answer for the example 4 above, could be:
Space Invaders Highscores day,3 6040,Mary Ann,2017/06/16T13:40:52 5120,John,2017/06/16T16:57:29 4922,Old Guy,2017/06/16T04:15:13 week,3 7076,The Champion,2017/06/12T21:34:02 6593,John,2017/06/15T09:26:45 6040,Mary Ann,2017/06/16T13:40:52 all,3 7841,Mary Ann,2016/11/08T10:31:54 7630,Someone,2017/03/25T23:59:59 7076,The Champion,2017/06/12T21:34:02
If you have any questions, suggestions or comments, send an e-mail to firstname.lastname@example.org
* Giving attribution is not required, but is greatly appreciated!