PHP code example of vlucas / openx-oauth-client

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

    

vlucas / openx-oauth-client example snippets


// Setup client and login with user
$client = new Vlucas\OpenX($consumerKey, $consumerSecret, $oauthRealm, 'http://ox-ui.example.com/ox/4.0/');
$client->login('[email protected]', 'souper-seekret-password');

// GET /account - for list of accounts
$res = $client->get('account');
var_dump($res->json());

// Makes normal request with necessary Cookie header
$res = $client->get('account');

// Returns the main GuzzleHttp\Client object
$guzzle = $client->getClient();

php composer.phar