1. Go to this page and download the library: Download dividebv/phpdivideiq 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/ */
dividebv / phpdivideiq example snippets
use DivideBV\PHPDivideIQ\DivideIQ;
$username = 'user'; // You will receive this from the provider.
$password = 'password'; // You will receive this from the provider.
$environment = 'production'; // May also be `staging` or an arbitrary URL.
// A file storing the connection status.
$file = new SplFileObject('persist.iq.txt', 'c+');
if ($file->getSize()) {
// The file already exists, instantiate DivideIQ using the file.
$divideIq = DivideIQ::fromFile($file);
} else {
// File doesn't exist. Instantiate DivideIQ using the constructor.
$divideIq = new DivideIQ($username, $password, $environment);
$divideIq->setFile($file);
}
// Access a resource provided by this Divide.IQ server.
$result = $divideIq->request('stockbase_stock');