PHP code example of dealnews / api-client

1. Go to this page and download the library: Download dealnews/api-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/ */

    

dealnews / api-client example snippets




$client = new \DealNews\API\Client\HTTP ("YOUR_API_KEY");

// perform a simple get request to an api endpoint
$response = $client->get("/features");

// echoes 200
echo $response['status'];

// dumps out all response headers
var_dump($response['headers']);

// echoes response body
echo $response['body'];