PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hey guys. I was wondering if there's a way to automatically change my main page on a certain time in the week. See I have a site for a radio show that i do every sunday night from 9 to midnight and i want to switch to a page that has a big blinking LISTEN NOW link on the main page when it's 9 p.m. and then back to normal at midnight. Is there any way to do a little time-based switcharoo here with php? I'm familiar with cron jobs if that would help. Thanks!
Aegiss wrote:Hey guys. I was wondering if there's a way to automatically change my main page on a certain time in the week. See I have a site for a radio show that i do every sunday night from 9 to midnight and i want to switch to a page that has a big blinking LISTEN NOW link on the main page when it's 9 p.m. and then back to normal at midnight. Is there any way to do a little time-based switcharoo here with php? I'm familiar with cron jobs if that would help. Thanks!
ok i'll try that. it's 9-12 central time though. Is there a way to set that in the code? just wondering if someone on the west coast would get something different
Make sure you account for the server location. I had a server located in Florida though my target audience was in California. It took me a few days before I realized I had to adjust the date/time display for three hours back.