开发者

Regarding PHP CURL

Could anybody let me know, if I understand the curl_getinfo() information right?

Array
(
    [url] => https://www.someserver.com
    [content_type] => text/html
  开发者_运维知识库  [http_code] => 200
    [header_size] => 350
    [filetime] => -1
    [ssl_verify_result] => 19
    [redirect_count] => 0
    [total_time] => 0.078
    [namelookup_time] => 0
    [connect_time] => 0.016
    [pretransfer_time] => 0.031
    [starttransfer_time] => 0.078
    [redirect_time] => 0
)

As I understand pretransfer_time means the time, when the headers request is already sent to the server and server is executing request? Then the starttransfer_time should mean the time, when the page is prepared by the server, and the client starts to receive data (headers+body?). Am I right?


About pretransfer_time, sure. starttransfer_time - when the client starts to receive data, but not server load time. There's no way to know unless it is configurated to send that info somehow.


Pretransfer_time

Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved

Starttransfer_time

Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be transferred. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜