PHP Curl GetInfo

Source: Internet
Author: User

<?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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.