View Full Version : Lock HTML code after specific time

09-04-2006, 07:44 AM
I'm a website designer in a small town. Its very hard here to convice people to launch their website. I recently got a project. The problem is my client is not paying me full amount, he's asking me to give him the site & after that he'll pay me. Tell me how can I lock the HTML code if he dont give me money??? in simple words.... I want a time lock which could stop working the site after a specific time(as we can do in VB). Please help me how can I apply a time lock on HTML pages???? should I use any JS or any server side ???

09-04-2006, 09:26 AM
Well server side would be the best... you could just run a function which shows the page if the time is before a certain date, or doesn't if it's after. Or you could just remove the pages from the server?

Either way, whatever you put on the Internet, can, I'm afraid, be taken...

I guess you could ask for half the amount now, half after; you and your client both need to build up trust with eachother. From his point of view, he doesn't know if you'll build the site or not. :)

09-04-2006, 10:16 AM
Actually he wants me to design his web free of cost :(
I'm afraid that he'll not pay me full amount after getting the WEB :(
Please give me any sample code that how can I solve my problem.
Help me please !!!

09-04-2006, 09:20 PM
Something like this... although my PHP isn't great, so you may want to experiment a bit first! :o

$today = mktime();
$expires = mktime( 0, 0, 0, 09, 30, 2006);
if ($today < $expires) {
} else {
echo "Preview has expired.";

09-05-2006, 07:14 AM
Thank you very much for your help. Please give one more favor....
When I use this code in HTML page it doesn't work & when I save the page as .php & try to open it prompts me to download the same php file. what should I do ???

09-05-2006, 07:39 AM
You need PHP installed on the server in order to be able to use it

09-05-2006, 07:43 AM
I've downloaded PHP 5.1.6 but dont dont know how to install & where 2 install. can u please help me ???

09-05-2006, 05:46 PM
do you own the webserver? because if not you cant install php you may have to fin different hosting

09-05-2006, 06:24 PM
If you want to run PHP on your local computer you also need a web server like Apache or IIS.

09-05-2006, 06:30 PM
hmm this is easy to install and quite good too. download it here (http://firepages.com.au/phpdev5u.htm) that is if you want to install it on your pc