Page Last Updated Custom Script

Joined
Nov 25, 2007
Messages
32
Reaction score
25
Need help since I know shit about javascript. There are plenty of free scripts that show when a page was last modified. Thats not what im looking for.

I need a script that will allow me to dynamically insert a date minus a custom number of days.

The idea is that it'll say "page last updated: some date" If i always show todays date that'll look kinda obvious. I'd rather show some random date within a short interval, say no more than 5-10 days. so it'll look more natural if the visitor returns, but will also show that its been recently updated.

anyone have a script like this they can share? Thanks a ton!
 
In PHP you can just do it like this:

PHP:
<?php echo date('l, m/d/Y',strtotime("-5 days"));
?>

Just change the 5 to how many days prior you want. You can also change the - to a + to do days in advance.

Thats good for doing things like "Sale Ends XXXX" and always having tomorrows date to create a sense of urgency because they always think the sale ends tomorrow.
 
Back
Top