1. Go to this page and download the library: Download zozocorp/worker 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/ */
zozocorp / worker example snippets
use Worker\Worker;
// First, instantiate the SDK with your API credentials
$wk = Worker::create('key-example'); // For VI servers
// Now, compose and send your message.
// $wk->messages()->send($domain, $params);
$wk->email()->send('example.com', [
'from' => '[email protected]',
'to' => '[email protected]',
'subject' => 'The PHP SDK is awesome!',
'text' => 'It is so simple to send a message.'
]);
$type = 'text';
$name = 'zozo'; // Field is optional
$email = '[email protected]'; // Field is optional
$meta = 'zozo.vn - Nền tảng thiết kế Website bán hàng chuyên nghiệp'; // Field is optional
$url = 'https://zozo.vn/'; // Field is optional
$phone = '0960099999'; // Field is optional
$wk = Worker::create('key-example');
$dns = $wk->qrCode()->encode(['type' => $type, 'content' => $meta]);
$type = 'mecard';
$name = 'zozo'; // Field is optional
$email = '[email protected]'; // Field is optional
$address = 'Tầng 7, Toà nhà iNET, số 247 Cầu Giấy, phường Dịch Vọng, Quận Cầu Giấy'; // Field is optional
$url = 'https://zozo.vn/'; // Field is optional
$phone = '0960099999'; // Field is optional
$wk = Worker::create('key-example');
$dns = $wk->qrCode()->encode(['type' => $type, 'name' => $name, 'email' => $email, 'address' => $address, 'url' => $url, 'phone' => $phone]);
$type = 'vcard';
$first_name = 'le'; // Field is optional
$last_name = 'thi'; // Field is optional
$title = 'Nền tảng thiết kế Website bán hàng chuyên nghiệp'; // Field is optional
$company = 'zozo.vn'; // Field is optional
$email = '[email protected]'; // Field is optional
$street = 'Tầng 7, Toà nhà iNET, số 247 Cầu Giấy, phường Dịch Vọng, Quận Cầu Giấy'; // Field is optional
$province = 'Hà Nội'; // Field is optional
$country = 'Việt Nam'; // Field is optional
$url = 'https://zozo.vn/'; // Field is optional
$phone = '0960099999'; // Field is optional
$wk = Worker::create('key-example');
$dns = $wk->qrCode()->encode([
'first_name' => $first_name, 'last_name' => $last_name,
'title' => $title, 'company' => $company, 'email' => $email,
'street' => $street, 'province' => $province, 'country' => $country,
'url' => $url, 'phone' => $phone]);