Can someone help me create a html snip it that I can post on a web page to generate a unlock code that changes weekly? Im new at this and can't figure it out. Any help is much appreciated.
Explanation:
Step 1: Get current week in year (CURRENTWEEK).In programing, the week begin at sunday and finish at saturday.
Step 2: CURRENTWEEK + "wwwconscom" = SEEK1.
Step 3: hash SEEK1 by MD5 algorithm = SEEK2 has 32 characters.
Step 4: get 12 characters beginning of SEEK2.
Example:
CURRENTWEEK is 3 (beginning of week is sunday in programming).
SEEK1 = 3wwwsexiconscom
SEEK2 = 3e62f1a7e929d72ce8db0fd1f8d8b5d2
FINAL CODE = 3e62f1a7e929
Code--------------Below
/*Code for this week: 9c171dbb8de
*/
public boolean checkCode(String code) {
boolean result = false;
Calendar calendar = [login to view URL]();
int week = [login to view URL](Calendar.WEEK_OF_YEAR);
String seek = "" + week + "wwwconscom";
seek = [login to view URL](seek);
seek = [login to view URL](0, 11);
seek = [login to view URL]();
code = [login to view URL]();
if ([login to view URL](seek) == 0)
result = true;
return result;
}