PHP code example of dhildreth / canon-http-webview

1. Go to this page and download the library: Download dhildreth/canon-http-webview 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/ */

    

dhildreth / canon-http-webview example snippets


use WVHttp\Client;

$client = new Client([
    'base_uri' => 'http://www.foo.com/1.0/',
    'auth' => [
        'username',
        'password',
    ],
    'timeout' => 20
]);

$client->open(['v' => 'jpg:640x480:5', 'p' => '50']);
$client->claim();
$client->control([
    'pan' => 15.75 * 100,
    'tilt' => -4.25 * 100,
    'zoom' => 55.8 * 100,
]);

$client->image('wvhttp_'.date('Y-m-d-H-s').'.jpg');
$client->yield();
$client->close();


bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar 
bash
php composer.phar update