PHP code example of bni / curl
1. Go to this page and download the library: Download bni/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/ */
bni / curl example snippets
BNI\Curl;
class YourController {
public function yourFunction() {
$request = Curl::get()
->url('https://api.facebook.com/v1/users/test')
->header([
['apiKey' => '123456'],
['serverKey' => 'asd9uwe'],
])
->eksekusi();
return $request;
}
}