PHP code example of fei / api-client

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

    

fei / api-client example snippets




ei\ApiClient\Transport\BasicTransport;
use Fei\ApiClient\Worker\BeanstalkProxyWorker;
use Pheanstalk\Pheanstalk;
use Pheanstalk\PheanstalkInterface;

$host = "127.0.0.1";
$port = PheanstalkInterface::DEFAULT_PORT;

$worker = new BeanstalkProxyWorker();
$worker->setPheanstalk(new Pheanstalk($host, $port));
$worker->setTransport(new BasicTransport());

$worker->run(BeanstalkProxyWorker::VERBOSE);



ei\ApiClient\Transport\BasicTransport;
use Fei\ApiClient\Worker\BeanstalkProxyWorker;
use Pheanstalk\Pheanstalk;
use Pheanstalk\PheanstalkInterface;

$host = "127.0.0.1";
$port = PheanstalkInterface::DEFAULT_PORT;

$worker = new BeanstalkProxyWorker();
$worker->setPheanstalk(new Pheanstalk($host, $port));
$worker->setTransport(new BasicTransport());

while (true) {
    $worker->run(BeanstalkProxyWorker::VERBOSE);
}