zero-perfoliate
zero-perfoliate
Home
Help
Search
Calendar
Login
Register
HTML5 & Friends
»
Programming Help On Specific Projects
»
PHP Scripts and Tips
»
Conditional If based on day/time
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Conditional If based on day/time (Read 526 times)
gensoup
New PHP Members
Posts: 1
Karma: +0/-0
Conditional If based on day/time
«
on:
January 26, 2009, 06:46:21 PM »
Newbe here; I want to create a small php file that will load one file if the date/time is between two date/times, and another file otherwise. Essentially I need for the first file to be available only for a period of hours. Is this doable? Thanks.
Logged
PhPHelper
http://Digiscapers.com
Full Member
PHP Problem Solvers
Posts: 179
Karma: +50/-0
Re: Conditional If based on day/time
«
Reply #1 on:
February 10, 2009, 02:27:24 PM »
yeah that can be done with php but php won't know what the actual time is inless your calling it from a server and in that case time zones will come into play.
If a user from the uk gets a file another user from say america might get a different file since on a different time zone. You could just the users local time from their computer you would need javascript to do that as php is server side and javascript is client side.
Logged
http://Digiscapers.com
Print
Pages: [
1
]
Go Up
« previous
next »
HTML5 & Friends
»
Programming Help On Specific Projects
»
PHP Scripts and Tips
»
Conditional If based on day/time