Auto-Update and Auto-Remove |
Auto-Update and Auto-Remove |
The-Shadow |
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 |
CharlesEF |
Oct 4 2013, 12:42 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 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.
|
The-Shadow |
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.
|
CharlesEF |
Oct 5 2013, 01:07 PM
Post
#4
|
Programming Fanatic Group: Members Posts: 1,981 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 |
Christian J |
Oct 5 2013, 02:13 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,686 Joined: 10-August 06 Member No.: 7 |
The PHP manual lists several date/time functions that might be used.
|
The-Shadow |
Oct 6 2013, 09:31 AM
Post
#6
|
Novice Group: Members Posts: 21 Joined: 20-September 13 Member No.: 19,759 |
Thanks Christian.
|
Lo-Fi Version | Time is now: 14th June 2024 - 08:39 AM |