hey,
so im making a program, and i want to make it so the program only works till a sertain date, but the problem that im having is that im geting the date from the computer, and if the user changes the date backwards a few days, then he will have access to the program and he gets to use it for a few more days
here is a part of my code..
1 2 3 4 5 6 7 8 9 10 11
SYSTEMTIME date;
GetSystemTime(&date);
if((date.wYear==2010)&&(date.wMonth==9)&&(date.wDay<30))
{
// do program stuff
}
else
{
// will not do program stuff
// will do other stuff i want it to
}
my question is How do i get the date from the internet so that the user cant just be able to use the program by changing the date a few days back ..
Would you then use time.windows.com ? I have always wondered what the protocol for that is.
Also, back on topic, you can store the last startup and shutdown time, and if they set their time back you can tell that it was before the last startup and you can call the user a cheater.
Really, you should run your own. It's not really fair to just use someone else's servers, is it? Heh.
But that wouldn't stop determined people, who could just re-route the DNS entry to localhost if they wanted.
kbw: if you're running off GMT/UTC, which doesn't change, I'd expect that wouldn't really be an issue. Unless he's going to be comparing the reported time to the system time, which is silly for a variety of reasons (users clock may not be exact).
mahertamim: if your program is this valuable that people would try to dupe you of a few days, then I'd suggest contacting a company specialising in such tools for a quote, and devote your effort to what your program actually is meant to do rather than wasting development effort. No matter what you do, if a user is determined to dupe you, they probably can.
well to be honest what im working on, is some game modifications and so on, that give more advantages to the user.. like killing an enemy from 1 hit, and seeing enemies throw walls and so on.. my problem is,, i dont want people to use this forever .. i just want to make it to a set time limit like only work for a week or so ...
Why bother? A week is long enough to finish most FPS games by far. What do you have to gain by limiting the users in what they do with it? Unless you're talking about creating hacks for multiplayer gaming.
Why would putting a limit on the product increase traffic? It'd just mean no one uses it for more than your specified amount of time, people get bored/forget about it. If you were to make it unlimited use, people would talk about it with their friends ("Wow, how'd you do that?", etc.)
yeah but i want to do it on and off kinda thing so ppl dont just come and download, and never visit the site until the next patch in the game,, i want them to be coming every week or so
nah, wt im thinking about doing is 1 week ill have a mod for a sertain game up one week then next week another game, and just alternate between the two.. and what ill be offering for free is actually being offered at other sites for 20 bucks per month
What do you mean? You mean you got problem calling cURL API or what ? Code snippets would be useful as I believe some forum-ers have used this cURL API before and they can help you instead.