<?php
$ch = Curl_init ("http://www.baidu.com/");
echo "<pre>";
Print_r (Curl_getinfo ($ch));
echo "</pre>";
/*
Array
(
[url] = Http://www.baidu.com/CURLINFO_EFFECTIVE_URL last valid URL address
[Http_code] = 0 Curlinfo_http_code The last HTTP code received
[Header_size] = 0 Curlinfo_header_size Header part size
[Request_size] = 0 curlinfo_request_size The size of the requested request in the HTTP request
[FILETIME] + 0 curlinfo_filetime time to obtain a document remotely, if not available, the return value is "1"
[Ssl_verify_result] = 0 Curlinfo_ssl_verifyresult Verification settings required for SSL authentication of the results Curlopt_ssl_verifypeer
[Redirect_count] = 0
[Total_time] = 0 curlinfo_total_time time spent in the last transmission
[Namelookup_time] = 0 curlinfo_namelookup_time time spent on name resolution
[Connect_time] = 0 curlinfo_connect_time time spent establishing a connection
[Pretransfer_time] + 0 Curlinfo_pretransfer_time from the time it takes to establish the connection to prepare the transfer
[Size_upload] = 0 curlinfo_size_upload total value of uploaded data
[Size_download] = 0 curlinfo_size_download The total value of the downloaded data volume
[Speed_download] = 0 curlinfo_speed_download average download speed
[Speed_upload] = 0 curlinfo_speed_upload average upload speed
[Download_content_length] + 0 curlinfo_content_length_download The length of downloaded content read from Content-length:field
[Upload_content_length] = 0 curlinfo_content_length_upload upload content size Description
[Starttransfer_time] = 0 Curlinfo_starttransfer_time The time it takes to start the connection to the transfer
[Redirect_time] = 0 Curlinfo_redirect_time The time used to redirect before transaction transfer starts
)
Curlinfo_header_out sending the requested string
Curlinfo_content_type the "Content-type" value of the downloaded content, NULL indicates that the server did not send a valid "Content-type:header"
*/
?>
PHP Curl GetInfo