1. Go to this page and download the library: Download clouding/presto-client-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/ */
clouding / presto-client-php example snippets
use Clouding\Presto\Presto;
$presto = new Presto();
$presto->addConnection([
'host' => 'localhost:8080',
'catalog' => 'default',
'schema' => 'presto',
]);
// Set manager as global (optional)
$presto->setAsGlobal();
$posts = $presto->connection()->query('select * from posts')->get();