city Posted November 8, 2006 Share Posted November 8, 2006 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. Can I change the date for string(something like id's charater)? Link to comment Share on other sites More sharing options...
jvanegmond Posted November 8, 2006 Share Posted November 8, 2006 Can I change the date for string?What? I have no idea what you are talking about. Describe what you want to do more clearly, and I'll give it another shot. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Uten Posted November 8, 2006 Share Posted November 8, 2006 How about just saving a md5 string of the page. The next time you download you can compare the two md5strings and if they differ you have a new page? hmm, could swear there was a md5 implementation in the UDF's by now, but could not find any. So you will have to search the forum. There you will find plenty. Even one (slow but works) implemented in Autoit. #include <INet.au3> #include <Date.au3> $md5previous = IniRead($inifile, "md5keys", "somsite","") $remote = _INetGetSource('http://www.somesite.com/pathto/time.txt') $md5now = md5($remote) If $md5previous <> md5Now Then ;... Do some work endif Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
city Posted November 8, 2006 Author Share Posted November 8, 2006 #include <INet.au3>$remote = _INetGetSource('www.geocities.com/time.txt')$var = iniRead($remote, "date","time","NotFound")MsgBox(4096, "Result", $var)thx anyway^^ but I found it cant work with the ini.file(or txt) at the website. And I think iniRead function only work with local file right? Any idea? Link to comment Share on other sites More sharing options...
PaulIA Posted November 8, 2006 Share Posted November 8, 2006 Well, we're getting zip for information on what he's trying to do, but I'll take a guess. Is he trying to figure out if a file's date/time has changed on a website? Give us some more info on what you're trying to do, please. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
city Posted November 8, 2006 Author Share Posted November 8, 2006 Let said I am doing some program(au3.exe) for my friend, But I want to remain him when he stop using my program and I know who are using my pragram. So I need save thier user name and expired date in my homepage for checking. My program wil automatic check from my homepage when some one try to open my program. If it check the user not my friend or the date is expired then the progam will be closed. What I want to know is how to write a such program according to the example code given by someone? Or another idea? Link to comment Share on other sites More sharing options...
PaulIA Posted November 8, 2006 Share Posted November 8, 2006 You'll have to download the file from your site and open it locally to check it's contents. Of course, if you can do this, so can anybody else. And they can probably modify the file too. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
city Posted November 8, 2006 Author Share Posted November 8, 2006 q1: I mean my program will check the information according to my website specified file's data, they cant change my data files at my website, except hack., right? q2 : No another ways? Link to comment Share on other sites More sharing options...
PaulIA Posted November 8, 2006 Share Posted November 8, 2006 q1: I mean my program will check the information according to my website specified file's data, they cant change my data files at my website, except hack., right?No, but they can read the file and look at all the information for your other users. From there, they can probably figure out how to impersonate another user or crack your registration code.q2 : No another ways?Not that I'm aware of.A better solution would be to create a service on your web server that listens for connections on a non standard port. You app would connect to your server via this port and send it's registration information. The web service would then verify if it is valid and send a response code. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 8, 2006 Moderators Share Posted November 8, 2006 You could always encrypt the data on the server, use _InetGetSource(), and make your own custom decryption and parser from within your app yourself. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
city Posted November 8, 2006 Author Share Posted November 8, 2006 No, but they can read the file and look at all the information for your other users. From there, they can probably figure out how to impersonate another user or crack your registration code.Not that I'm aware of.A better solution would be to create a service on your web server that listens for connections on a non standard port. You app would connect to your server via this port and send it's registration information. The web service would then verify if it is valid and send a response code.I knew but i just want to learn more about au3 for this question. can some one teach me?^^ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 8, 2006 Moderators Share Posted November 8, 2006 I knew but i just want to learn more about au3 for this question. can some one teach me?^^http://www.autoitscript.com/forum/index.php?showtopic=21048 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now