i want to apply 30 days trial to that folder .i have no login form and nothing else how can i do it?
when you create the folder, it means everybody in the world will have access to it unless you protect it with a login of some description. Which may be okay for you, I don't know.
As soon as the folder is created, add a record to your DB table, such as
set the folder_name to the newly created folder name and the expiry to 30 days from now. So when your client tries to access any pages in the folder, you could have this in an include file to place in each page...
//connect to db
//get expiry date - if expired redirect to renew page - else show page
Alternatively, you could run a daily cron job to run a script to produce a .htaccess file into that folder which has the content:
please tell me on localhost how can i apply expiry to application?without session and cookie.
So you want to create code for others to download onto their machines, which then expires after 30 days?
You could try hardcoding expiry into the php code and then use ioncube to encrypt the code. The problem with local php code is that it is visible, so the user could tinker with it. Likewise any DB tables.
You could use license keys, but this would probably mean a connection to the internet each time the user needed to use it.
You could maybe release a trial version with reduced functionality and then have a 'pro' version.
Sorry, this isn't really my area - all my stuff is strictly free code.
Why on earth would you want to run a php app locally?
Sounds daft to me.
Only way to do this otherwise is to create an exe or runnable file for whatever OS you are using. Then you need to work out how to write to the registry.
This isn't easy.
Sounds daft to me
In addition, our forum guidelines ask that you show evidence of your own work. We've seen nothing so far. Although we are here to help, we're not here to write all your code, nor to do your research for you. You've been given a few pointers, but php is not particularly suited for this.
You could run a demo on your site and ask for payment which would lead to a download.