How do I get the date from the internet.

Get help using Construct 2

Post » Fri Apr 18, 2014 5:39 pm

Hey there :D

Does anyone know if there's any way one could get the date from the internet using an in-game expression?

Similar to how Browser.ExecJS("Date()" gets the date from the system.

In any case, i need a reliable way to get the date, that can't be tempered with by the user. (with Browser.ExecJS("Date()"), the user can just change the date on the device)

hopefully someone knows a way =)
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Fri Apr 18, 2014 6:07 pm

You can use the ajax object with: http://www.timeapi.org/

[joke]Or you can use: https://www.okcupid.com/ , but it doesn't seem to work with Firefox for some reason.[/joke]
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Fri Apr 18, 2014 9:03 pm

@newt damn, i got really happy too soon...

I spent like an hour reading old forum posts, the manual, tutorials, etc...
so... how i am a suppose to input this on my game? T_T
B
43
S
12
G
6
Posts: 446
Reputation: 6,802

Post » Fri Apr 18, 2014 9:54 pm

That api is open source so you could host it on your own server, byt honestly you would be better off using javascript since you can't guarantee if the service will keep working.
It does use up somebody else's bandwidth.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, nahima and 13 guests