PHP code example of sb15 / php-curl-client
1. Go to this page and download the library: Download sb15/php-curl-client 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/ */
sb15 / php-curl-client example snippets
$client = new \Sb\Curl\Client();
$client->setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0');
$client->setDebug();
$response = $client->get('https://httpbin.org/get');
echo $client->getResponseCode() . "\n";
echo $response . "\n";
echo $client->getTrace() . "\n";
bash
composer