time limited website?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

time limited website?

Post by paul_20k »

Hi

Is it possible to make a website in PHP which stops working after calculated period of time...like it will stop working after 3 months or it will require a password to operate after first 3 months?

Thanks
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: time limited website?

Post by Zoxive »

paul_20k wrote:Hi

Is it possible to make a website in PHP which stops working after calculated period of time...like it will stop working after 3 months or it will require a password to operate after first 3 months?

Thanks
Yes, it is possible.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Code: Select all

<?php
if(time() > $allowable_time_frame)
{
    // Allowable time frame could be pulled from a file or database or whatever you like
    echo 'Nice try kiddo... beat it!';
    exit;
}

// Continue to website...
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

Post by paul_20k »

thanks
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

Post by paul_20k »

Hi Zoxive, Ninja

your idea is different from what Ninja explained? Ninja, if someone has access to this php file, they can just remove this part from the code and that lmit is gone forever....is there any any other way to do it?

Thanks
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

try using database or google for "encrypt php"
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

Post by paul_20k »

Hi

You mean to encrypt the whole php code?

Thanks
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

yes, or if you want to encrypt only data from database, try http://www.phpfreaks.com/tutorials/128/0.php
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

Post by paul_20k »

Thanks ddragas..I got it..I will try it soon
Post Reply