Get DateTime from internet.
Hope it's the right section to post this... this is my first question.
Hi everyone. I'm developing a mobile game in wich there is an upgrade system. The player starts the upgrade and then waits (or he could spend gems or similar currency to skip the time). The problem i came up with, is that the blueprints (such as UTCnow and Now) can get only the DateTime based on the system's. This is easily cheatable: the player could change the time on his device, catch the reward and then return the time right. To avoid this i thought about getting DateTime from a server (for example NTP cause it's free) and store it in a variable when the player launches the game... but i can't find any useful resource online.
I would like to understand if this could be possible and: -how to connect to a server (especially an NTP one) in ue4. -gather DateTime from that server and store it in a variable. I can learn C++ if it's needed.
Thank you in advance, hope to hear from you soon!
Hi,Sbro987!Well basically you can use the HTTP module from Unreal Engine, to send the POST or GET request and get your timestamp from server and at start of the game you can check it and make a check. A little help link to start you with Http Module. https://wiki.unrealengine.com/Http-requests After that you can make a server on whatever you backend language you want and send it back to the users.
answered Jun 19 '19 at 07:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here