PHP code example of padraic / humbug_get_contents

1. Go to this page and download the library: Download padraic/humbug_get_contents library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

padraic / humbug_get_contents example snippets


$content = Humbug\get_contents('https://www.howsmyssl.com/a/check');

// Don't end headers with \r\n when setting via array
Humbug\set_headers([
    'Accept-Language: da',
    'User-Agent: Humbug',
]);

$response = Humbug\get_contents('http://www.example.com');

$response = Humbug\get_contents('http://www.example.com');
$headers = Humbug\get_headers();
bash
composer