Web service for UTC time to prevent mobile game cheating

766 views Asked by At

I want to prevent "time cheating" via setting the mobile device's clock forward. It's ok for the game to require a network connection. After looking over the numerous "time web service" related resources I'm a bit lost. I just want to submit a request to something like www.gettime.com/utc and parse the result to use in my game.

What's a good web service to use for this purpose?

Note the game only requests utc time once on start-up. It looks like I should use an NTP server but I'm not sure which is a good choice. Since the url will be hard-coded in the app it's important to make a good choice.

1

There are 1 answers

0
Sandman On

You have here a 'web service' that offers you the current UTC time in millis. A simple GET request will suffice... If you go to the homepage you will see a similar link that gives you the seconds since the epoch.