Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello, iam making an application which performs some string operations on a text in a richtextbox in the following way:

the user writes some text in a richtextbox and then clicks a button. The text is then send to a PHP page for operation and the result is then stored in another richtextbox. The php part cannot be removed and is important.

What i want is the license to allow x number of uses per day. So let's say that the person is allowed to use the function 3 times. This has to be done on the application itself. I also want to be able to detect any date/time change to prevent overuse. I thought to declare a variable and store it on HDD. But then it raises other problems.

Iam asking for a general idea as to how should i proceed?

AGAIN : Every day the person can use the click button for 3 times. This count should be reset every 24 hrs. The nteditor software won't run 24 hrs. So next time it launches it should update the count.
Posted
Updated 30-Oct-11 19:57pm
v2

Since the function already requires a server (PHP or anything), the server should keep the count.
It would eliminate many problems of keeping the count locally.

That said, I'm not sure why you want to impose such limitation.
It seems too restrictive.
So my second suggestion is avoid it if possible.

It's up to you, though.
Good luck.
 
Share this answer
 
It seems you need this for a web application why don't you think of making a database table for registered users and maintain the count in the table and fetch the count when user logs in, You may use datetime/timestamp type column in the table to track login time of users; use a managed stored procedure to update this. May be this helps........
Best wishes;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900