Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Server Configuration _ Auto-Update and Auto-Remove

Posted by: The-Shadow Oct 4 2013, 08:20 AM

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

Posted by: CharlesEF Oct 4 2013, 12:42 PM

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.

Posted by: The-Shadow Oct 5 2013, 08:02 AM

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.

Posted by: CharlesEF Oct 5 2013, 01:07 PM

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.

Posted by: Christian J Oct 5 2013, 02:13 PM

The PHP manual lists several date/time functions that might be used.

Posted by: The-Shadow Oct 6 2013, 09:31 AM

Thanks Christian.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)