PHP code example of cawa0505 / rivescript-php
1. Go to this page and download the library: Download cawa0505/rivescript-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/ */
cawa0505 / rivescript-php example snippets
use \Axiom\Rivescript\Rivescript;
$message = 'hello bot';
$rivescript = new Rivescript();
$rivescript->load('example.rive');
echo $rivescript->reply($message);