PHP cURL curl_getinfo() Output

Posted on September 6, 2017 at 10:58 pm

Example output of cURL curl_getinfo():

Array
(
    [url] => http://www.example.com/path.php
    [content_type] => text/html; charset=iso-8859-1
    [http_code] => 302
    [header_size] => 304
    [request_size] => 322
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.290086
    [namelookup_time] => 0.06063
    [connect_time] => 0.155486
    [pretransfer_time] => 0.155554
    [size_upload] => 0
    [size_download] => 210
    [speed_download] => 723
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0.290056
    [redirect_time] => 0
    [redirect_url] => http://redirect.com/abc.php
    [primary_ip] => XXX.XXX.XXX.XXX -> IP of www.example.com
    [certinfo] => Array
        (
        )
 
    [primary_port] => 80
    [local_ip] => XXX.XXX.XXX.XXX -> Local IP of the server\VPS
    [local_port] => 8282
)

Other Posts

Updated Posts