Jump to content

Calculate the different period time in exe and date from one's website( .html).


city
 Share

Recommended Posts

If I make an exe(au3) to my friend, I set the expired date in the exe, the exe will check the date from my html in my homepage and calculate the deffirent date for exe to consider can work or not. After the expired date the exe will auto exit after open it.

Can someone tell me how to do? or other way(either java script or GCI) to do? any suggestion?

Post it or send to my email : lazzygame@yahoo.com.my

10Q ^^

Link to comment
Share on other sites

Have a look at FileGetTime, _DateDiff, and probably _INetGetSource.

#include <INet.au3>

MsgBox(0,"nothing",ConsoleWrite(_INetGetSource('www.yahoo.com')))

Thxq for your help ^^. but i still cant get it xD. The massege box show 1 only.

Link to comment
Share on other sites

Ok, here's a more obvious hint.

#include <INet.au3>
#include <Date.au3>

$remote = _INetGetSource('http://www.somesite.com/pathto/time.txt')
$local = FileGetTime(@ScriptFullPath, 2)
$diff = _DateDiff('D', $local[0] & '/' & $local[1] & '/' & $local[2], $remote)

Then, just do some evaluation on $diff.

Edited by xcal
Link to comment
Share on other sites

#include <INet.au3>

#include <Date.au3>

$remote = _INetGetSource('http://www.somesite.com/pathto/time.txt')

$local = FileGetTime(@ScriptFullPath, 2)

$diff = _DateDiff('D', $local[0] & '/' & $local[1] & '/' & $local[2], $remote)

;$remote = _INetGetSource('http://www.somesite.com/pathto/time.txt')

MsgBox(0,"asd",$diff)

---------------------------------------------------------------------

Massege Box =0

--------------------------------------------------------------------

xD I am too noob.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...