Skip to content

Kirby 4.5.0

$remote->info()

Returns the request info

$remote->info(): array

Return type

array

Parent class

Kirby\Http\Remote

Example

<?php
$response = Remote::get('https://picsum.photos/200/300');

dump($response->info());

/**
 * Example dump result
Array
(
    [url] => https://fastly.picsum.photos/id/101/200/300.jpg?hmac=xUDvORQTxaML0fp9wnx4y6LIHvc7M-tNcOJz8rDLRXo
    [content_type] => image/jpeg
    [http_code] => 200
    [header_size] => 1458
    [request_size] => 269
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 1
    [total_time] => 0.31152
    [namelookup_time] => 0.063239
    [connect_time] => 0.107737
    [pretransfer_time] => 0.187745
    [size_upload] => 0
    [size_download] => 9100
    [speed_download] => 29211
    [speed_upload] => 0
    [download_content_length] => 9100
    [upload_content_length] => 0
    [starttransfer_time] => 0.306241
    [redirect_time] => 0.171962
    [redirect_url] =>
    [primary_ip] => 111.222.33.44
    [certinfo] => Array()
    [primary_port] => 443
    [local_ip] => 192.168.1.2
    [local_port] => 61445
    [http_version] => 3
    [protocol] => 2
    [ssl_verifyresult] => 0
    [scheme] => https
    [appconnect_time_us] => 187025
    [connect_time_us] => 107737
    [namelookup_time_us] => 63239
    [pretransfer_time_us] => 187745
    [redirect_time_us] => 171962
    [starttransfer_time_us] => 306241
    [total_time_us] => 311520
    [effective_method] => GET
    [capath] =>
    [cainfo] => /etc/ssl/cert.pem
)
 */