PHP code example of vinaykevadia / bing-api-php

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

    

vinaykevadia / bing-api-php example snippets




ing\Client;

// You need to obtain a key
$key = '';

$c = new Client($key, 'json');

$res = $c->get('News', array('Query' => 'Obama'));

$res = json_decode($res, true);

print_r($res);