PHP code example of apolinux / curl
1. Go to this page and download the library: Download apolinux/curl 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/ */
apolinux / curl example snippets
$curl = new Curl();
$payload = ['fin' => 'this is a test','bla' => 'no more'] ;
$response = $curl->postJson('https://httpbin.org',$payload);
print($response->response->toJson());
// prints:
// Array
// (
// [fin] => this is a test
// [bla] => no more
// )