IndianWebPortal.com

Something Different In Linux

Home » Email Marketing Series » Set expiration for you index page

If you want to set the expiration to your site   means after some date or year your site shows custom error on the page then you can add following code in index page below the “<?php” code  and set the date as per your request.

============================================

$exp_date = "2010-04-31";
$todays_date = date("Y-m-d");
$today = strtotime($todays_date);
$expiration_date = strtotime($exp_date);

if ($expiration_date <= $today)
{
echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>

<head>

<title>Expired...</title>

</head>
<body>

<h1>What you search</h1>

<p>Now Site is Expired </p>

<hr>

<address>I have set the expiration to my site ,we need to increase expiration date in index page</address>

</body>
</html>

';
exit;
}

============================================

12 Responses so far.

  1. Do you guys have a facebook fan webpage? I searched for one on facebook or myspace but couldnt find one, Id love to become a fan!

  2. Amie Gammage says:

    I enjoy, result in I found just what I used to be having a look for. You’ve ended my four day lengthy hunt! God Bless you man. Have a great day. Bye

  3. Test says:

    I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to design my own blog and would like to know where u got this from. many thanks

  4. Ioninfoda says:

    You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material

  5. NolaUtilia says:

    Very Interesting Information! Thank You For Thi Post!

  6. diving says:

    I find myself coming to your blog more and more often to the point where my visits are almost daily now!

  7. buy vemma says:

    You certainly have some agreeable opinions and views. Your blog provides a fresh look at the subject.

  8. Very informative post. Thanks for taking the time to share your view with us.

  9. You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...