The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Auto-Update and Auto-Remove
The-Shadow
post Oct 4 2013, 08:20 AM
Post #1


Novice
**

Group: Members
Posts: 21
Joined: 20-September 13
Member No.: 19,759



Hey guys,

I want to auto-update and auto-remove a page. What i want to do is:

I want to keep a page online for like 1 day and if you visit it something will happen. <<< I know how to do this
But how to automatically update it to the website on like 12:00 PM and automatically remove it after that 1 day. <<< I need help with this

Thanks,
Bye
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Oct 4 2013, 12:42 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,672
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I would think you need to check with your web host. I think you can create a 'cron' job to run at a certain time and rename/remove the page you want. Just an idea on my part.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
The-Shadow
post Oct 5 2013, 08:02 AM
Post #3


Novice
**

Group: Members
Posts: 21
Joined: 20-September 13
Member No.: 19,759



I'm making my website on XAMPP now. I want a code or something to do that for me and test that it works before putting my site online.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Oct 5 2013, 01:07 PM
Post #4


Programming Fanatic
********

Group: Members
Posts: 1,672
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Well, I can't help you with actual code. I have not used cron since my UNIX days, over 25 years ago. You can search the web for help.

My web host has an option called 'Scheduled Jobs' that allow you to setup jobs to run. You could write a php script to rename/remove the page you want and run that script in your cron (scheduled jobs) job at a certain time.

This post has been edited by CharlesEF: Oct 5 2013, 01:11 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 5 2013, 02:13 PM
Post #5


.
********

Group: WDG Moderators
Posts: 8,238
Joined: 10-August 06
Member No.: 7



The PHP manual lists several date/time functions that might be used.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
The-Shadow
post Oct 6 2013, 09:31 AM
Post #6


Novice
**

Group: Members
Posts: 21
Joined: 20-September 13
Member No.: 19,759



Thanks Christian.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 13th October 2019 - 09:59 PM