[Project_owners] expiration date of the php page

Chris Neale cdn at mozdev.org
Mon Oct 20 18:20:11 EDT 2003


On Monday 20 Oct 2003 16:59, Biju G C wrote:
> need some help php
> I want to programmatically set expiration date of the php page.
> now I use
>    header("Expires: Mon, 30 Oct 2003 05:00:00 GMT");
> Instead it should be current day + 1
>
> what should be the right date expression for this
>
> thanks in advance
> biju
>

you would likely have to create a unix timestamp for 'now'

i.e. $now = time();

then add 24 hours in seconds to it,

i.e.

$oneday = 60 * 60 * 24;

$tomorrow = $now + $oneday;

then in local.conf [ before <!DOCTYPE > ]

header('Expires: ' . gmdate("D, j M Y H:i:s", $tomorrow) . ' GMT');

j might need to be d

d	Day of the month, 2 digits with leading zeros
j	Day of the month without leading zeros

hth

-- 

cdn

--

Extensions for Mozilla-based Applications [ http://cdn.mozdev.org/ ]

get Orbit3+1, Orbit Retro and other Mozilla themes from : 
http://themes.mozdev.org/



More information about the Project_owners mailing list