Jump to content

Get accurate time from webserver and sycn it with yours.


dataxa

Recommended Posts

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?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.