PHP code example of chatway-live-chat / chatway-live-chat-php
1. Go to this page and download the library: Download chatway-live-chat/chatway-live-chat-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/ */
chatway-live-chat / chatway-live-chat-php example snippets
echo Chatway\Chatway::make('your-widget-id')->getScript();
echo Chatway\Chatway::make('your-widget-id', 'your-secret-key', 'id')
->withVisitor('123', '[email protected]')
->getScript();
->setTags('VIP', '#FFD700')
->setTags([
'VIP' => '#FFD700',
'Supporter' => '#00FF00'
]);
->setCustomFields('Plan', 'Premium')
->setCustomFields([
'Subscription' => 'Gold',
'Status' => 'Active'
]);
echo Chatway\Chatway::make('your-widget-id', 'your-secret-key', 'email')
->withVisitor('123', '[email protected]')
->setTags('VIP', '#FFD700')
->setTags(['Supporter' => '#00FF00'])
->setCustomFields('Plan', 'Pro')
->setCustomFields([
'Country' => 'USA',
'Language' => 'English'
])
->getScript();