Source language: Translate to:

Getting An Independent Date

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Getting An Independent Date

Postby Pat Baner » Mon Jan 31, 2011 1:57 pm

Hello all.

Anyone got a good method for getting and independent date so people can't bypass security features that are based on dates?

I was thinking of getting the date from a website or the net but have absolutely no idea of what that would entail.

Any help would be great.

Thanks.
Pat Baner
 
Posts: 75
Joined: Tue Jan 04, 2011 9:21 am

Re: Getting An Independent Date

Postby andybrock » Mon Jan 31, 2011 2:37 pm

Travin69 wrote:Hello all.

Anyone got a good method for getting and independent date so people can't bypass security features that are based on dates?

I was thinking of getting the date from a website or the net but have absolutely no idea of what that would entail.

Any help would be great.

Thanks.


You can make a simple php script that will return the unix time string and then use internetget to grab the output of it.

Code: Select all
<?php
echo time();
?>


Andy
User avatar
andybrock
 
Posts: 181
Joined: Mon Apr 20, 2009 1:38 pm
Location: Somerset, UK

Postby Pat Baner » Mon Jan 31, 2011 7:52 pm

So, in order to accomplish this, I just put that code in a text file. Change the file ext to .php, upload it to my server and then use the internetget feature to access that directly?

Does that sound right or is it more complicated?
Pat Baner
 
Posts: 75
Joined: Tue Jan 04, 2011 9:21 am

Postby Jay-Bird » Tue Feb 01, 2011 12:14 pm

This may not help, but I once considered this for a project:

NIST provides free software called nisttime-32bit.exe and source code for programmers who want to write their own applications.


More info can be found here:

http://www.nist.gov/pml/div688/grp40/its.cfm

I believe you can query NIST using the newer Network Time Protocol .


Jaybird


EDIT TO ADD:

I was more interested myself, so on further investigation I found that I could retrieve the current NIST time by going to this page:

http://www.time.gov/timezone.cgi?Central/d/-6/java

then while examining the html source I see:

Code: Select all
// BEGIN - NIST DYNAMIC DATA /////////////////////////////
 
 
var NISTSendTime = new Date( "February  1, 2011 19:17:17");
var QueryTimeZone = -6;
var QueryTimeZoneOffsetMin = -360
var QueryTimeZoneName = "Central";
var QueryDSTString = "Standard Time";
 
// END - NIST DYNAMIC DATA ////////////////////////////////////


perhaps you could parse it and extract the time w/o having to use any php scripting of your own.
User avatar
Jay-Bird
 
Posts: 164
Joined: Fri Apr 01, 2005 7:01 am
Location: Louisiana , USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron