mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-19 23:31:42 +00:00
19 lines
331 B
PHP
19 lines
331 B
PHP
<?php
|
|
|
|
// keywords: diagnose, troubleshoot, help
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use Curl\Curl;
|
|
|
|
$curl = new Curl();
|
|
$curl->get('https://httpbin.org/status/400');
|
|
|
|
if ($curl->error) {
|
|
echo 'An error occurred:' . "\n";
|
|
$curl->diagnose();
|
|
} else {
|
|
echo 'Response:' . "\n";
|
|
var_dump($curl->response);
|
|
}
|