dataxa Posted September 17, 2012 Share Posted September 17, 2012 I want to sync my local servers time to remote servers. I am using cURL to communicate with remote web server and get that servers time from response header "Date: xxx. xx xxx xxxx xx:xx:xx GMT". Date header is generated before sending data back to local server so i must add the time which took remote server to upload headers to my local server. I am using curl_getinfo and i get 5 numbers: CURLINFO_TOTAL_TIME = 1,264 CURLINFO_NAMELOOKUP_TIME = 0,016 CURLINFO_CONNECT_TIME = 0,125 CURLINFO_PRETRANSFER_TIME = 0,125 CURLINFO_STARTTRANSFER_TIME = 1,264 Which of these tell me, how long did it took between saving server time into Date header and sending it to my me? Can anyone explain! Am I even on the right track or am I missing something? Quote Link to comment https://forums.phpfreaks.com/topic/268462-get-accurate-time-from-webserver-and-sycn-it-with-yours/ Share on other sites More sharing options...
trq Posted September 17, 2012 Share Posted September 17, 2012 Why don't you simply sync all your servers times using NTP? Quote Link to comment https://forums.phpfreaks.com/topic/268462-get-accurate-time-from-webserver-and-sycn-it-with-yours/#findComment-1378592 Share on other sites More sharing options...
dataxa Posted September 18, 2012 Author Share Posted September 18, 2012 Because remote servers time is not accurate and I don't have access to it to make changes. Quote Link to comment https://forums.phpfreaks.com/topic/268462-get-accurate-time-from-webserver-and-sycn-it-with-yours/#findComment-1378889 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.