c_shelswell Posted November 20, 2006 Share Posted November 20, 2006 Hi is there anyway using php to get the actual date from a trusted source rather than it taking the date from a users computer clock?Can it be grabbed off the internet in anyway?Many thanks Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted November 20, 2006 Share Posted November 20, 2006 PHP takes the date/time from the server where it runs, not the local PC.Ken Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 20, 2006 Share Posted November 20, 2006 If you would like to change the date of the server do this:[code]<?php$day = date("j") + 2; // day 1 - 31 and add 2$month = date("n") + 5; // month 1 through 12 and add 5$year = date("Y") - 3; // year yyyy and subtract 3echo $month.'/'.$day.'/'.$year;?>[/code] Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted November 21, 2006 Author Share Posted November 21, 2006 excellent thanks - that'll be why it was changing the time when i changed my pc's clock - silly me ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.