Jump to content

Check the id(string) in text file at my homepage.


city
 Share

Recommended Posts

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

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
Link to comment
Share on other sites

#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

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

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

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

  • Moderators

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

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

  • Moderators

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

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...