I’m looking for some code which can check whether 30 days have passed, and if so the script will stop working; if not, it calls the start() function.
I only need to do it in Javascript.
var date = 11;
var month = 10;
var year = 2012;
function Checkday() {
if ( // check 30 days ) {
start();
} else {
stop();
};
};
I’m also wondering whether there is a way to add PHP code in a JS file. I know this is a stupid question but I’m just curious.
Thanks in advance.
Edited:
We will be selling the JS file so we will be setting the date in the JS file. So we want it to check the expiry time and stop functioning.
This might help you..